- Joined
- Sep 11, 2013
- Messages
- 467
Greetings!
My friend helped me to do this trigger and i have 2 little problem with it..
Each hero can make permanent Shades (1 shade/minute) and those Shades has 3 slots of inventory and can Trasfer Items. (there can be a lot of shades on the map at the end ~150)
Each shade i want to be able to transfer items like a normal courier..
Shades can die if that is important.
PROBLEMS..
1.With that trigger, if i have for example 3 Shades (from 1 hero/player) and each shade has for example 1 item and i press the spell (transfer items) on each one. Only the last one who received the order will send the items. The other 2 shades will just follow the hero.
***I want each shade to transfer items not only the last one i order..
2.If i send for example 1 shade to transfer items and before transferring them I stop the shade(courier) or move in other direction, The second trigger will never stop and will check if the hero is near courier to send items. This is annyoing because if i get closer to shade with hero, the shade will still transfer items even if i don't want it anymore.
***How can i stop the shade to transfer items if i want to close the last order?
The help will be appreciated!
My friend helped me to do this trigger and i have 2 little problem with it..
-
Transfer Items
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Trasfer Items SHADE
-
-
Actions
-
Set VariableSet TempIntegerTT[1] = (Player number of (Owner of (Triggering unit)))
-
Set VariableSet Trasport_ActiveTT[TempIntegerTT[1]] = True
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Casting unit)) Equal to Shade
-
-
Then - Actions
-
Set VariableSet TransferCasterTT[TempIntegerTT[1]] = (Casting unit)
-
Set VariableSet TransferTargetTT[TempIntegerTT[1]] = (Random unit from (Units owned by (Player(TempIntegerTT[1])) matching (((Matching unit) is A Hero) Equal to True).))
-
Set VariableSet TempPointTT[1] = (Position of TransferTargetTT[TempIntegerTT[1]])
-
Unit - Order TransferCasterTT[TempIntegerTT[1]] to Follow TransferTargetTT[TempIntegerTT[1]]
-
Trigger - Turn on Transfer Items Loop Check <gen>
-
Custom script: call RemoveLocation(udg_TempPointTT[1])
-
-
Else - Actions
-
-
-
-
Transfer Items Loop Check
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Set VariableSet TempIntegerTT[1] = 0
-
Set VariableSet TransferIterationTT = (TransferIterationTT + 1)
-
For each (Integer IntegerAAA) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Trasport_ActiveTT[IntegerAAA] Equal to True
-
-
Then - Actions
-
Set VariableSet TempPointTT[1] = (Position of TransferCasterTT[IntegerAAA])
-
Set VariableSet TempPointTT[2] = (Position of TransferTargetTT[IntegerAAA])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TransferIterationTT Greater than or equal to 3
-
-
Then - Actions
-
Unit - Order TransferCasterTT[(Integer A)] to Move To TempPointTT[2]
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between TempPointTT[1] and TempPointTT[2]) Less than or equal to 200.00
-
-
Then - Actions
-
Unit - Order TransferCasterTT[IntegerAAA] to Stop.
-
For each (Integer IntegerBBB) from 1 to 3, do (Actions)
-
Loop - Actions
-
Hero - Give (Item carried by TransferCasterTT[IntegerAAA] in slot IntegerBBB) to TransferTargetTT[IntegerAAA]
-
-
-
Set VariableSet Trasport_ActiveTT[IntegerAAA] = False
-
-
Else - Actions
-
-
Custom script: call RemoveLocation(udg_TempPointTT[1])
-
Custom script: call RemoveLocation(udg_TempPointTT[2])
-
-
Else - Actions
-
Set VariableSet TempIntegerTT[1] = (TempIntegerTT[1] + 1)
-
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempIntegerTT[1] Greater than or equal to 12
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TransferIterationTT Greater than or equal to 3
-
-
Then - Actions
-
Set VariableSet TransferIterationTT = 0
-
-
Else - Actions
-
-
-
Each hero can make permanent Shades (1 shade/minute) and those Shades has 3 slots of inventory and can Trasfer Items. (there can be a lot of shades on the map at the end ~150)
Each shade i want to be able to transfer items like a normal courier..
Shades can die if that is important.
PROBLEMS..
1.With that trigger, if i have for example 3 Shades (from 1 hero/player) and each shade has for example 1 item and i press the spell (transfer items) on each one. Only the last one who received the order will send the items. The other 2 shades will just follow the hero.
***I want each shade to transfer items not only the last one i order..
2.If i send for example 1 shade to transfer items and before transferring them I stop the shade(courier) or move in other direction, The second trigger will never stop and will check if the hero is near courier to send items. This is annyoing because if i get closer to shade with hero, the shade will still transfer items even if i don't want it anymore.
***How can i stop the shade to transfer items if i want to close the last order?
The help will be appreciated!
Last edited: