Guest User

arrow

a guest
Oct 8th, 2025
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. my_arrow = class({})
  2.  
  3. function my_arrow:OnSpellStart()
  4. local caster = self:GetCaster()
  5. --A Liner Projectile must have a table with projectile info
  6.  
  7. local cursorPt = self:GetCursorPosition()
  8. local casterPt = caster:GetAbsOrigin()
  9. local direction = cursorPt - casterPt
  10. direction = direction:Normalized()
  11.  
  12. local speed = self:GetSpecialValueFor("speed")
  13.  
  14. local info =
  15. {
  16. Ability = self,
  17. EffectName = "particles/econ/items/mirana/mirana_crescent_arrow/mirana_spell_crescent_arrow.vpcf", --particle effect
  18. vSpawnOrigin = caster:GetAbsOrigin(),
  19. fDistance = 2000,
  20. fStartRadius = 64,
  21. fEndRadius = 64,
  22. Source = caster,
  23. --bHasFrontalCone = false,
  24. --bReplaceExisting = false,
  25. iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
  26. iUnitTargetFlags = DOTA_UNIT_TARGET_FLAG_NONE,
  27. iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
  28. fExpireTime = GameRules:GetGameTime() + 10.0,
  29. bDeleteOnHit = true,
  30. vVelocity = direction * speed,
  31. bProvidesVision = true,
  32. iVisionRadius = 1000,
  33. iVisionTeamNumber = caster:GetTeamNumber()
  34. }
  35.  
  36.  
  37. projectile = ProjectileManager:CreateLinearProjectile(info)
  38.  
  39.  
  40. end
Tags: None
Advertisement
Add Comment
Please, Sign In to add comment