| 08-07-2003, 01:52 AM | #1 |
i made a trigger that when a unit enters a region it changes it for 10 seconds to a different unit, but for some reason it creates two of the changed unit. why? unit enters region unit type of triggering unit equals unit A unit group-pick every unit in playable map area and do unit replace triggering unit with unit B using new units default settings. set variable - unit B wait 10 seconds unit group-pick every unit in units in playable map area and do unit replace variable with a unit A using new units default settings. |
| 08-07-2003, 02:07 AM | #2 |
try changing it to this: Code:
Events:
- Unit Enters a region
Conditions:
- UnitTypeOf(Entering Unit) == UnitType(unitA)
Actions:
- Replace (Entering Unit) with UnitTypeOf(unitB) using default settings
- set Variable = (Last Replaced Unit)
- Wait 10 game-time seconds
- Replace Variable with UnitTypeOf(unitA) using default settingsAcording to the way you worded it, you want to basicly 'morph' the unit into a different one for 10 seconds. But the way you have it coded is: 'morph' every unit on the map for 10 seconds, then 'morph' only the last picked unit to a copy of the entering unit. |
| 08-07-2003, 02:08 AM | #3 |
Whoah, there's alot wrong with that trigger. First of all, you mean UNIT-TYPE A and B, not UNIT (this can cause confusion!). as for trigger: replace triggering unit with unit of type (unittypeB) wait replace (last replaced unit) with unit of type (unittypeA) |
| 08-07-2003, 02:26 AM | #4 |
none of those worked, please help. |
