- Joined
- Sep 11, 2011
- Messages
- 1,176
hello everyone!
i'm helping someone to make a system that kills all unit inside a transport when the transport died. but it seems that my trigger didn't work properly. take a look :
the hashtable should save all unit that's loaded into the transport
P.S i already create a hashtable, and make a trigger that detects when the transport is in the map.
i'm helping someone to make a system that kills all unit inside a transport when the transport died. but it seems that my trigger didn't work properly. take a look :
-
Loading Units
-

Events
-


Unit - A unit Is loaded into a transport
-
-

Conditions
-

Actions
-


For each (Integer IntegerVariable) from 1 to TransportCount, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Transporting unit) Equal to Transport[IntegerVariable]
-
-





Then - Actions
-






Set PassengerCount[IntegerVariable] = (PassengerCount[IntegerVariable] + 1)
-






Game - Display to (All players) the text: (Transport name : + ((Name of Transport[IntegerVariable]) + ( Number + (String(IntegerVariable)))))
-






Game - Display to (All players) the text: (Number of Passengers : + (String(PassengerCount[IntegerVariable])))
-






Hashtable - Save Handle Of(Triggering unit) as IntegerVariable of PassengerCount[IntegerVariable] in hash
-
-





Else - Actions
-
-
-
-
-
-
Dead Transports
-

Events
-


Unit - A unit Dies
-
-

Conditions
-

Actions
-


For each (Integer IntegerVariable) from 1 to TransportCount, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Triggering unit) Equal to Transport[IntegerVariable]
-
-





Then - Actions
-






For each (Integer IntegerVariable2) from 1 to PassengerCount[IntegerVariable], do (Actions)
-







Loop - Actions
-








Game - Display to (All players) the text: (Name of (Load IntegerVariable of IntegerVariable2 in hash))
-








Unit - Kill (Load IntegerVariable of IntegerVariable2 in hash)
-
-
-
-





Else - Actions
-
-
-
-
-
-
Hashtable - Save Handle Of(Triggering unit) as IntegerVariable of PassengerCount[IntegerVariable] in hash
P.S i already create a hashtable, and make a trigger that detects when the transport is in the map.


