HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Replace initial townhall and peons

07-28-2005, 02:10 PM#1
Keitaro
How would a trigger that replaces the starting townhall and peons look like?
I'm thinking about making a fifth playable race for normal maps, and came to this solution as to how to make it selectable.
The player has to write a code like 'new race' and a trigger will replace the standard townhall and peons with custom ones. It would be great if it could work for all races but, human is just fine.
07-28-2005, 04:59 PM#2
AFZ
You'll have to delete the default trigger and and your own triggers to add custom units. You will probably have to set the race selection to a dialog system or unit selection system (or other) because you can't just add a 5th race to the races menu.
07-29-2005, 03:39 PM#3
Keitaro
I don't think that what I'm thinking of requires me to change standard default settings or make some kind of 'selection system'.
I want everything to be standard when choosing to play the human race right up until I write a special message.
That is my 'selection system'. I can choose to play human race or change my townhall and peons into custom townhall and peons which I 'call' Neutral Race. I don't think I can actually create a custom race category.
I find it better than having a wisp or something choose which race I want to play or some other system. I don't know what the dialogue system is though.

The reason I think that it can be done is because I remember that 'commoners' transformed into footmen in Arthas campaign. I just want peons to transform into custom peons and human townhall transformed into custom townhall.

So far I've found my way to: unit-replace(trigering unit) with (custom unit) using the new units default life and mana.
How do I replace 'triggering unit' with 'starting nits' or 'peasents'?
07-29-2005, 07:53 PM#4
Peekaboo
the trigger for this would go something like this
Code:
EVENTS
Player x types 'new race' as an exact match

CONDITIONS
Elapsed game time is less than or equal to 10.00

ACTIONS
Pick every unit owned by player x of type <town hall> and do replace picked unit with <new town hall>
Pick every unit owned by player x of type <peon> and do replace picked unit with <new worker>
hope this helps
07-30-2005, 12:22 AM#5
Vexorian
The better way would be using the Trigger Call that returns The Player's start location and create the stuff there.

I think that to have a 5th race you need a race dialog at the start of the map or something like that
07-30-2005, 09:48 PM#6
Keitaro
Thanks Peekaboo. I haven't felt this grateful since Panto showed me how to limit custom heroes. That's exactly what I needed. I'll probably add the dialogue too since it's a good idea, but I'm only playing my custom maps with family and friends on a local network so they already know what to do.
Thanks a lot!