- Joined
- Aug 14, 2018
- Messages
- 9
I am trying to implement an "advanced structure" feature, and my method is:
Two peons with everything identical except Structures Built.
Ability based on "Berserk" called "Build Advanced Structure"
Two abilities based on "Bear Form", which will transform the one peon into to the other
Triggers look like the following:
Convert to advanced builder:
The reason I am using this method for advanced structures is because if a unit is holding resources, I do not want those resources to be lost if they are ordered to build a building that is not of their tech level. Simply replacing a unit results in this loss of resources.
I would also like to mention that if I transform the unit back to its base form, it will be able to construct buildings again.
Edit: Just tried with Chaos - same result
Two peons with everything identical except Structures Built.
Ability based on "Berserk" called "Build Advanced Structure"
Two abilities based on "Bear Form", which will transform the one peon into to the other
Triggers look like the following:
Convert to advanced builder:
-
Events
-
Unit - A Unit is issued an order with no target
-
-
Conditions
-
Unit-type of (Ordered unit) Equal to Peon (Basic)
-
Issued order Equal to Order(berserk)
-
-
Actions
-
Trigger - Turn off <Convert to Basic Peon>
-
Unit - Add "Convert to Advanced Peon" to (Ordered unit)
-
Unit - Remove "Convert to Advanced Peon" from (Ordered unit)
-
Unit - Order (Ordered Unit) to Build
-
Trigger - Turn on <Convert to Basic Peon>
-
-
Events
-
Game - The 'Build Structure' button is clicked
-
-
Conditions
-
Actions
-
Set VariableSet IntPlayer = (Player number of (Triggering player))
-
Unit Group - Pick every unit in (Units owned by (Player(IntPlayer)) of type Peon (Advanced)) and do (Actions)
-
Loop - Actions
-
Unit - Add "Convert to Basic Peon" to (Picked unit)
-
Unit - Remove "Convert to Basic Peon" from (Picked unit)
-
-
-
The reason I am using this method for advanced structures is because if a unit is holding resources, I do not want those resources to be lost if they are ordered to build a building that is not of their tech level. Simply replacing a unit results in this loss of resources.
I would also like to mention that if I transform the unit back to its base form, it will be able to construct buildings again.
Edit: Just tried with Chaos - same result
Last edited by a moderator: