- Joined
- Dec 2, 2016
- Messages
- 733
-
Check if base is claimed
-
Events
-
Unit - A unit Begins construction
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Constructing structure)) Equal to Flag
-
(Base1 <gen> contains (Constructing structure)) Equal to True
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
BasesInUse[1] Equal to True
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Bases[1] Not equal to (Owner of (Triggering unit))
-
-
Then - Actions
-
Unit - Set (Constructing structure) construction progress to 0%
-
-
Else - Actions
-
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
BasesInUse[1] Equal to False
-
-
Then - Actions
-
Set Bases[1] = (Owner of (Triggering unit))
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
-
-
Basically, I have a unit. He can build a building which is a flag, the trigger activates when a building starts constructing. I check through a ton of variables which checks if the structure is equal to a flag, check if that specific base is in use or not. Check if base is in use then check if owner of constructing structure and if not then set the construction progress to 0, which I hope cancels the building and refunds the resources? And if the base isn't in use then set the variables to that specific player.
Idk how else to do this without this massive tech tree, I'm probably missing something too as I haven't tested this yet. I'm wondering if someone could help me shorten this or do it more efficiently?