Carl-Fredrik
New Member
- Reaction score
- 51
Hello everyone... I've been trying to make a trigger that spawns units for 4 different lanes and then send them away towards each other, but for some reason it doesn't work :/
The units are not created...
So, here's one of the four triggers that's supposed to do this:
And I was also wondering, if I put this into a bigger trigger (all 4 of the others) will they run at the same time or will the functions go off one at a time?
Edit:
I added BJDebugMsg to check where the trigger it stops. The first one is shown but none of the others.. :S
The units are not created...
So, here's one of the four triggers that's supposed to do this:
JASS:
scope LifeSpawn1 initializer InitSpawnL1
private function Actions takes nothing returns nothing
local location SpawnLoc = GetRectCenter(gg_rct_LifeSpawn)
local location SendLoc = GetRectCenter(gg_rct_Region_028)
local real w = 0.5
local integer ExtraWave
call BJDebugMsg("Wtf?1")
if ExtraWave == 3 then
call CreateUnitAtLoc(Player(10), 039;n00A039;, SpawnLoc, bj_UNIT_FACING)
set ExtraWave = 1
call TriggerSleepAction(w)
call BJDebugMsg("Wtf?2")
else
set ExtraWave = ExtraWave + 1
call BJDebugMsg("Wtf?3")
endif
call BJDebugMsg("Wtf?4")
call CreateUnitAtLoc(Player(10), 039;n001039;, SpawnLoc, bj_UNIT_FACING)
call IssuePointOrderLoc(GetLastCreatedUnit(), "attack", SendLoc)
call TriggerSleepAction(w)
call CreateUnitAtLoc(Player(10), 039;n001039;, SpawnLoc, bj_UNIT_FACING)
call IssuePointOrderLoc(GetLastCreatedUnit(), "attack", SendLoc)
call TriggerSleepAction(w)
call CreateUnitAtLoc(Player(10), 039;n002039;, SpawnLoc, bj_UNIT_FACING)
call IssuePointOrderLoc(GetLastCreatedUnit(), "attack", SendLoc)
call TriggerSleepAction(w)
call CreateUnitAtLoc(Player(10), 039;n007039;, SpawnLoc, bj_UNIT_FACING)
call IssuePointOrderLoc(GetLastCreatedUnit(), "attack", SendLoc)
call RemoveLocation(SpawnLoc)
call RemoveLocation(SendLoc)
set SpawnLoc = null
set SendLoc = null
endfunction
private function InitSpawnL1 takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterTimerEvent(t, 30, true)
call TriggerAddAction(t, function Actions)
endfunction
endscope
And I was also wondering, if I put this into a bigger trigger (all 4 of the others) will they run at the same time or will the functions go off one at a time?
Edit:
I added BJDebugMsg to check where the trigger it stops. The first one is shown but none of the others.. :S