- Joined
- Jul 25, 2009
- Messages
- 194
JASS:
scope TestProjectiles initializer init
globals
private location loc = Location(0, 0)
endglobals
public function jumpfilter takes nothing returns boolean
return GetSpellAbilityId()=='A0H9'
endfunction
public function jumpmain takes nothing returns nothing
local unit caster = GetTriggerUnit()
local real xA = GetUnitX(caster)
local real yA = GetUnitY(caster)
local real xB = GetSpellTargetX()
local real yB = GetSpellTargetY()
local vector vA
local vector vB
local projectile p
call IssuePointOrder(caster, "move", xB, yB)
call MoveLocation(loc, xA, yA)
set vA = vector.create(xA, yA, GetLocationZ(loc)+GetUnitFlyHeight(caster))
call MoveLocation(loc, xB, yB)
set vB = vector.create(xB, yB, GetLocationZ(loc))
set p = projectile.create(caster)
call p.launch(vA, vB, 600, 0.4)
set p.activePitch = false
set p.activeRotation = true
set p.activeUnitCollision = false
set p.toKill = false
call vA.destroy()
call vB.destroy()
set caster = null
endfunction
public function init takes nothing returns nothing
local trigger t = CreateTrigger()
local trigger jump = CreateTrigger()
local timer h = NewTimer()
call TriggerRegisterPlayerUnitEvent(jump, Player(0), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
call TriggerAddCondition(jump, Filter(function jumpfilter))
call TriggerAddAction(jump, function jumpmain)
endfunction
endscope
hey this is a jump spell from berb's projectile map.
is there any way of making this jump spell work for all players with only 1 trigger?
I got it to work but i had to make 12 seperate triggers since i dont know any jass