Thanks for your help! I have read the variable-tutorial, but I am not sure if I have understood it correctly. I am like an analphabet when it comes to math, triggering and that kind of logical thinking : /
Before I show you what I have done so far, I describe a few things first:
- On my map, which is a kind of custom melee map, workers for one of the races can construct a moveable building called WarCaravan. (Perhaps I make Warcaravan a unit trained from a building, but right now it is a building)
- Players can research an upgrade that gives an aura to the WarCaravan.
- When the Warcaravan stands still, the aura enables. When the Warcaravan moves, the aura is disabled.
- There are no WarCaravans from the start, players can only construct them. The only way for a Warcaravan to get into the game is from construction. There can be several in-game for different players at the same time.
I have created a Varible called WarCaravanVariable which I choosed as an "unit-type Variable" since there can be many of this unit.
-
Adding Aura to WarCaravan
-
Events
-
Unit - A unit Finishes construction
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to War Caravan
-
Actions
-
Unit - Add War Caravan Aura (Neutral Hostile) to (Triggering unit)
-
Set WarCaravanVariable = (Unit-type of (Triggering unit))
I done as you said QirajiLord, if I got it right, and added the Set Variable at the bottom of the trigger that creates the unit.
-
Move1
-
Events
-
Time - Every 0.06 seconds of game-time
-
Conditions
-
Actions
-
Set Point1 = (Position of (Your unit))
At the Your Unit above, I choose "Position of (Triggering Unit)"
How does the trigger above know that it is the WarCaravan I refer to as triggering unit?
Well.. Even if someone answears, I have a feel that I won't get it right anyways.. . I have caused people a lot of headache with my request for this kind of trigger. Such a silly thing to have an aura that applies when the unit stands still only, but I really need that to work. So far I have managed to create triggers by people's instructions, but this time I don't get it right.
Althought this is not the Request-forum, I wonder if someone has the time and energy to create this trigger for me on my map if I send it to you?