- Joined
- Nov 30, 2007
- Messages
- 1,202
This is not wroking at all, it's not running.
The second trigger, any ideas? :>
The second trigger, any ideas? :>
-
Gate Setup
-
Events
- Map initialization
- Conditions
-
Actions
- -------- Apartment 1 --------
- Player Group - Add Player 1 (Red) to GateControl_g[GateCount]
- Set GateOwner[GateCount] = Player 1 (Red)
- Set Gate[GateCount] = Gate (Elven) 0067 <gen>
- Set GatePathing[GateCount] = Gate Blocker 0281 <gen>
- Set GateFacing[GateCount] = 0.00
- Custom script: set udg_GateCount = udg_GateCount + 1
- -------- Apartment 2 --------
- Set Gate[GateCount] = Gate (Elven) 0066 <gen>
- Set GatePathing[GateCount] = Gate Blocker 0084 <gen>
- Set GateFacing[GateCount] = 0.00
- Set GateFacing[(GateCount + 500)] = 0.85
- Custom script: set udg_GateCount = udg_GateCount + 1
- -------- Apartment 3 --------
- Set Gate[GateCount] = Gate (Elven) 0102 <gen>
- Set GatePathing[GateCount] = Gate Blocker 0106 <gen>
- Set GateFacing[GateCount] = 0.00
- Set GateFacing[(GateCount + 500)] = 0.85
- Set GateStatus[GateCount] = -2
- Custom script: set udg_GateCount = udg_GateCount + 1
-
For each (Integer A) from 0 to GateCount, do (Actions)
-
Loop - Actions
- Destructible - Hide GatePathing[(Integer A)]
- Custom script: call TriggerRegisterDeathEvent( gg_trg_Gate_Dies, udg_Gate[GetForLoopIndexA()] )
-
Loop - Actions
-
Events
JASS:
function Trig_Gate_Dies_Actions takes nothing returns nothing
local integer i = 0
loop
exitwhen i > udg_GateCount
if (GetDyingDestructable() == udg_Gate[i]) then
call DestructableRestoreLife(udg_Gate[i], 1, true)
call SetDestructableAnimationBJ( udg_Gate[i], "death")
call SetDestructableInvulnerableBJ(udg_Gate[i], true)
call KillDestructable(udg_GatePathing[i])
//set udg_GateStatus[i] = 0 // GateStatus = Broken
set i = udg_GateCount + 1
else
set i = i + 1
endif
endloop
endfunction
//===========================================================================
function InitTrig_Gate_Dies takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerAddAction(t, function Trig_Gate_Dies_Actions)
set t = null
endfunction