Replacing units (Triggers)

Ryman1024

New Member
Reaction score
0
Hey, Im pretty new to triggers, and Im pretty lost where I am, Can anyone tell me how I can make my dialog box button replace the starting units (5 workers-Town hall) with that of my custom race? Im lost at what actions are needed when the button is pressed. Thanks in advance.
 

Extremedesyr

New Member
Reaction score
6
with
Dialog - A dialog button is clicked

Condition - Clicked dialog button equal to (Your dialog button)
^ thats a dialog button comparison

Action
Unit - Replace (your unit) with (the unit that will be in place) with max health of replaced unit.

and do that for each of the 5 units, or when its a unit group u can simplify it by using 1 action instead of 5
 

Ancient-wolf

New Member
Reaction score
22
why replace them?, is it not easier to make a dialog and then just create the units after the button has been clicked instead of replacing them? ;)
 

Ryman1024

New Member
Reaction score
0
What Im trying todo is make a custom race much more playable, than having to edit the four main races, or adding a custom builder. So What I wanna do is, give the player a chance to decide if he'd like to play Human for an example, or the custom race. If the player clicks the custom race, all the custom workers and buildings replace the human ones. Thats what Im going for, you probably know more about it than me, because I suck with triggers.
 

ArmyOfFrogs

New Member
Reaction score
20
What ancient wolf said is right I think you just mis understood him o_O It'd be easier to start them out with nothing, then make a dialog box for each of the races, including humans. That way you can just spawn them rather than replacing them. However if you really need to replace them..

Trigger:
  • Events
    • A dialog button is clicked
    • Conditions
      • Dialog button equal to Custom Race
    • Actions
      • Unit Group - Pick every unit owned by triggering player and do (actions)
        • If all (conditions) are true then do then (actions) else do else (actions)
          • if - conditions
            • Unit - Unit-type of (picked unit) equal to peasant
            • Unit - Unit-type of (picked unit) equal to (do this for all the other races)
          • Then - actions
            • Unit - Replace picked unit with (unit for custom race)
          • Else - actions
            • do nothing


freehanded so might be some mistypes but that should work
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top