I am creating a custom mod to attach to any map; I have a copy of the Nexus unit that I want to substitute in when a player has a custom option enabled. Is there any way to do this?
EDIT: I figured it out. I created a new trigger library with a trigger inside.
I have a value assigned to each player labeled Has Warp Nexus
The trigger:
Meele Init
Events
Game -Map initialization
Local Variables
i = 0 <Integer>
Conditions
Actions
Player Group -Pick each player in (All players) and do (Actions)
Actions
General -If (Conditions) then do (Actions) else do (Actions)
If
(Has Warp Nexus value for player (Picked player)) == True
Then
Unit Group -Pick each unit in (Nexus units within 500000.0 of (Point(0.0, 0.0)) where player (Picked player) matches filter Excluded: Missile, Dead, Hidden, with at most 1) and do (Actions)
Actions
Unit -Replace (Picked unit) with a Warp Nexus using New Unit's Default vitals
Else