Unit Randomizer -1 reply

Please wait...

Siphon

Slightly cooler than a n00b

50 XP

13th December 2004

0 Uploads

43 Posts

0 Threads

#1 16 years ago

I want players in my map to be able to choose a ranom hero... Like, typing -random and they get one of the available heroes. (Note: in the start of the game the heroes aren't on screen, they are trainable from buildings that you get access to at the start of the game through a beacon)

Any ideas?




~~FwopLop~~

I'm too cool to Post

50 XP

25th December 2004

0 Uploads

10 Posts

0 Threads

#2 16 years ago

you could do something like at map initilization it sets each region of where the beacons are to an array. Set Region[1] = Beacon 1 Set Region[2] = Beacon 2 etc..

Event: Player X types -random as exact match Action Set RegionChooser = Random Integer between 1 and (Highest Region[X]) Pick every unit of type Hero Chooser owned by Triggering Player -Unit - Move Picked Unit instantly to center of Region[RegionChooser]

Now when the player types -random it will move their hero chooser to a random region, just as if they moved it there themselves




Siphon

Slightly cooler than a n00b

50 XP

13th December 2004

0 Uploads

43 Posts

0 Threads

#3 16 years ago

Don't think you understand me.. The beacons do nothing.. they are next to a neutral building that the heroes are located in, a Tavern to be exact... The beacons are there cause they are more practical than placing units for each player next to the Tavern.




Muttonus

Meh, whatever

50 XP

29th December 2004

0 Uploads

12 Posts

0 Threads

#4 16 years ago

If there is just one tavern then you could have a similar sort of trigger that 'buys' for the unit- create{random hero}, set stock=stock-1, or if there is more than one tavern then select the tavern at random as well