semi random unit trainer

alt bringer

New Member
Reaction score
3
im trying to make it so i can train say a builder unit, but have it cycle thru
making pesant,peon,accolyte, etc
(using one buton obviously)
but not only changing the skin but the unit itself
 

perkeyone

something clever
Reaction score
71
i think he wants one "train unit" button, that trains a unit from a list of units

so one button would be "train builder" and your list of builders contains "peasant, peon, acolyte" it would train a peasant the first time you click it, but if you click it again it will train a peon.
 

alt bringer

New Member
Reaction score
3
i think he wants one "train unit" button, that trains a unit from a list of units

so one button would be "train builder" and your list of builders contains "peasant, peon, acolyte" it would train a peasant the first time you click it, but if you click it again it will train a peon.


yeah thats it, any ideas how i can do that?
 

perkeyone

something clever
Reaction score
71
you might be able to do it by creating a dummy unit called "builder"
and make your give your building the ability to train "builder"s

then chose one of these

easy way,
make a trigger so that once the "builder" is finished training, it gets replaced by a different unit based on a loop and an array of unit types.

harder way, (might not work, havent tested)
give the building the ability to train all the possible types of units but then, at the start of the map, disable all of them except for the dummy builder type. in a trigger, once the train "builder" order is given, cancel the order and then enable a unit type from a variable, begin training it, then disable it again.
 

alt bringer

New Member
Reaction score
3
i think ill jus try to make the town hall train multipul units seperatly

(it would look nicer if i got it, but if i do too many complicated things
ones bound to F' me over)

thanx for the info though, im bound to use it sooner or later, if jus not in same instance
 

AoW_Hun7312

I'm a magic man, I've got magic hands.
Reaction score
76
Use an ability that uses a casting time equivalent to the training time of your unit. When it begins casting, check if the user doesn't have the required resources (cancel it). If he does have the required resources, take it away and begin casting. If the spell is stopped manually, refund the resources. If the spell finishes casting, create a unit randomly chosen from an array.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top