hi, i have some triggers that try to create that idea:
the Trebuchet unit is a nutural machine usebale by anyone (when it's built it transformers to nutural).
if a hero is near it he can buy a unit from it, the unit is a dummy for using the trebuchet and triggers the use.
when used the trebuchet becomes owend by the owner of the user and the user can't attack or move (cuz he's using the machine).
after you start using the machine you can buy the dummy unit agein to stop using it. this makes the machine turn nutural agein and SUPPOSED to allow you to move agien.
i created 2 arrays of units, one for the machine users and one for the mcahine used so i can keep track of them.
so the prob is that after you leave the machine the trigger fails to earse you and the machine from the arrays, so the unit can't move.

the Trebuchet unit is a nutural machine usebale by anyone (when it's built it transformers to nutural).
if a hero is near it he can buy a unit from it, the unit is a dummy for using the trebuchet and triggers the use.
when used the trebuchet becomes owend by the owner of the user and the user can't attack or move (cuz he's using the machine).
after you start using the machine you can buy the dummy unit agein to stop using it. this makes the machine turn nutural agein and SUPPOSED to allow you to move agien.
i created 2 arrays of units, one for the machine users and one for the mcahine used so i can keep track of them.
so the prob is that after you leave the machine the trigger fails to earse you and the machine from the arrays, so the unit can't move.
-
Use Trebuchet
-
Events
-
Unit - A unit Sells a unit
-
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to Trebuchet (Machine)
-
-
Actions
-
Unit - Remove (Sold unit) from the game
-
Set Temp_Bool_1 = False
-
For each (Integer A) from 1 to 20, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Selling unit) Equal to MachineUsed[(Integer A)]
-
-
Then - Actions
-
Set Temp_Bool_1 = True
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Temp_Bool_1 Equal to False
-
-
Then - Actions
-
Unit - Remove Select Hero (Machine) from (Triggering unit)
-
Unit - Remove Sell Units from (Triggering unit)
-
For each (Integer A) from 1 to 20, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(MachineUser[(Integer A)] Equal to No unit) and (Temp_Bool_1 Equal to False)
-
-
Then - Actions
-
Set MachineUser[(Integer A)] = (Buying unit)
-
Set MachineUsed[(Integer A)] = (Triggering unit)
-
Set Temp_Bool_1 = True
-
Game - Display to (All players) the text: Done 1
-
-
Else - Actions
-
-
-
-
Unit - Move (Buying unit) instantly to (Position of (Ownership-changed unit)), facing (Position of (Triggering unit))
-
Unit - Make (Buying unit) face (Triggering unit) over 0.00 seconds
-
Wait 0.20 seconds
-
Unit - Change ownership of (Triggering unit) to (Owner of (Buying unit)) and Change color
-
Game - Display to (All players matching ((Owner of (Buying unit)) Equal to (Matching player))) the text: Unit Cant Move Whil...
-
Set Temp_Bool_1 = False
-
Selection - Clear selection for (Owner of (Triggering unit))
-
Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
-
-
Else - Actions
-
For each (Integer A) from 1 to 20, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Buying unit) Equal to MachineUser[(Integer A)]) and ((Owner of (Selling unit)) Not equal to Neutral Passive)
-
-
Then - Actions
-
Unit - Change ownership of MachineUsed[(Integer A)] to Neutral Passive and Change color
-
Unit - Add Select Hero (Machine) to (Ownership-changed unit)
-
Unit - Add Sell Units to (Ownership-changed unit)
-
Set MachineUser[(Integer A)] = No unit
-
Set MachineUsed[(Integer A)] = No unit
-
Game - Display to (All players) the text: left
-
-
Else - Actions
-
-
-
-
-
-
-
Last edited: