Templarion
Member
- Reaction score
- 8
I have started a new project and after 5% is done I've realized how much triggers I need to do. Making the triggers ain't the problem but doing them multiple times is.
Copying/Pasting helps a lot but even then it is possible that I make some mistakes when modifying the triggers (example: make 10 triggers and change only player numbers and regions in them).
I have already done a couple of general triggers which help me a lot but now I am asking your help.
In the game there is a Unit which can build Marks (using ability, not actually building). I would like to do a Trigger which destroys the Mark if the Unit walks too far from the Mark when it is still in Construction. Is there anyway to do a general trigger so I wouldnt need to do this multiple times. The Mark can be constructed only in specific areas and building it anywhere else causes another trigger to remove it.
Here is one example:
Only problem is that now the Unit can leave the region and it should NOT be able to do that until the Construction ends (without causing the Mark to be removed).
Reputation for useful answers and tips!
Copying/Pasting helps a lot but even then it is possible that I make some mistakes when modifying the triggers (example: make 10 triggers and change only player numbers and regions in them).
I have already done a couple of general triggers which help me a lot but now I am asking your help.
In the game there is a Unit which can build Marks (using ability, not actually building). I would like to do a Trigger which destroys the Mark if the Unit walks too far from the Mark when it is still in Construction. Is there anyway to do a general trigger so I wouldnt need to do this multiple times. The Mark can be constructed only in specific areas and building it anywhere else causes another trigger to remove it.
Here is one example:
Code:
StayWhenMarking
Events
Unit - A unit Begins construction
Conditions
(Unit-type of (Constructing structure)) Equal to Mark of Fear
Actions
Unit Group - Pick every unit in (Units within 512.00 of (Position of (Constructing structure))) and do (If ((Owner of (Picked unit)) Equal to (Owner of (Constructing structure))) then do (Do nothing) else do (Unit - Remove (Constructing structure) from the game))
Only problem is that now the Unit can leave the region and it should NOT be able to do that until the Construction ends (without causing the Mark to be removed).
Reputation for useful answers and tips!