HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Im New Help!

07-16-2004, 10:06 PM#1
~Saint~
Hey, im new to the whole map making thing but im tryin to get the hang of it and i got most stuff down but i need help with soemthin, when the game starst i want ther to be a board that pops up and has options on what race you want to be, i also need to to when you click the button of the race, it will give you that race if anyone understands pls help!
07-16-2004, 10:25 PM#2
Map-o-builder
I understand.
You must use triggers with functions of group Dialog. First trigger with creating of dialog and showing it after the map loads (event "Elapsed game-time 0.01 seconds"). Then four trigger for each race with event "Dialog Button Clicked".
07-17-2004, 07:05 AM#3
~Saint~
uh i tried that and it still didnt work so if you could explain more detailed on what to do id appreciate it thnx
07-17-2004, 09:38 AM#4
Map-o-builder
First create two variables - first Dialog variable labelled RacesDialog and second array of buttons Labelled Buttonz. Then Create trigger with event "Elapsed Game Time 0.01 Seconds" and these actions:

Dialog - Clear RacesDialog
Dialog - Change the title of RacesDialog to Select Race
Dialog - Create a dialog button for RacesDialog labelled Humans
Set Buttonz[0] = (Last created dialog Button)
Dialog - Create a dialog button for RacesDialog labelled Orcs
Set Buttonz[1] = (Last created dialog Button)
Dialog - Create a dialog button for RacesDialog labelled Night Elves
Set Buttonz[2] = (Last created dialog Button)
Dialog - Create a dialog button for RacesDialog labelled Undead
Set Buttonz[3] = (Last created dialog Button)
Dialog - Show RacesDialog for Player 1 (Red)

(change labels if you need)

Next create four triggers with event "Dialog Button Clicked" and Condition "(Clicked Dialog Button) Equal To (Buttonz[...])" with your actions for each race.
07-17-2004, 11:23 PM#5
~Saint~
alright i almost got this but when it comes to the final actions to place the units after the button is selected do i chose


Event-Dialog-A dialog button is clicked for racesdialog
Conditions-clicked dialog button is equal to buttonz[0]
Actions-Unit-Create 5 peasants for (??????) at (??????) start location


Do i chose selected player for each of those? or do i hve to go through each one and do p1 red, p2 blue, p3 teal so on....
07-17-2004, 11:33 PM#6
Map-o-builder
It depends on what you need. Do you want to create a single-player map or multiplayer?
07-17-2004, 11:57 PM#7
Map-o-builder
If you want to create a multiplayer map, you must use four Dialog variables for each player, four button arrays (for each player) and 4*players count triggers for each player and race.

If you don't want to create so much triggers, you can use less triggers by using If...Then...Else.
07-20-2004, 04:25 PM#8
Dark_Uber
Here try this...

Event-Dialog - A dialog button is clicked for racesdialog
Conditions - Cicked dialog button is equal to buttonz[0]
Actions - Unit - Create 5 peasants for (Triggering Player) at (Triggering Player) Start Location

Then just change the type of units spawned for each button :D
07-20-2004, 05:07 PM#9
Milkman
The game can't detect which player who clicked the dialog, hence the [0], [1], [2] and so on. It's like this:
Button1[1],[2],[3],[4]
Button2[1],[2],[3],[4]

You can use the trigger Map-o-builder gave you. And to answer your last question, yes you have to have seperate triggers or If loops.
07-20-2004, 05:23 PM#10
Anitarf
That's why most multi player maps don't use the menus, but rather chat messages to get input from players. It's a method with a lot less style, but easier to implement.

An alternative option that would look nice would be to have a generic starting building that could build 4 units (like a wisp, peon, peasant and acolyte), and then, when a unit was trained (event - generic unit event - a unit finishes training a unit), that unit and the starting building would be removed and the starting units corresponding with the race of the trained unit would be created for that player (owner of unit (trained unit)).
07-20-2004, 05:25 PM#11
dragnstitch
heh thanks.. even though i didnt ask for help on this subject.. i just learned how to use dialogs =)
07-21-2004, 01:38 AM#12
Dark_Uber
Quote:
Originally Posted by Milkman
The game can't detect which player who clicked the dialog, hence the [0].

I have a old map I made which uses dialogs to set a race at the beggining of the game and this works fine using (Triggering Player). This lets the player choose Human, Orc, Undead, or Night Elf, and it makes the base for what they chose...


Events: Dialog - A dialog button is clicked for RaceDialog

Conditions: (Clicked dialog button) Equal to Human

Actions: Unit - Create 1 Castle for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees

Unit - Create 1 Altar of Kings for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees

Player Group - Add (Triggering player) to humanrace

Camera - Pan camera for (Triggering player) to ((Triggering player) start location) over 1.00 seconds
07-21-2004, 02:36 PM#13
Milkman
Quote:
Originally Posted by Computer[Uber]
I have a old map I made which uses dialogs to set a race at the beggining of the game and this works fine using (Triggering Player). This lets the player choose Human, Orc, Undead, or Night Elf, and it makes the base for what they chose...


Events: Dialog - A dialog button is clicked for RaceDialog

Conditions: (Clicked dialog button) Equal to Human

Actions: Unit - Create 1 Castle for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees

Unit - Create 1 Altar of Kings for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees

Player Group - Add (Triggering player) to humanrace

Camera - Pan camera for (Triggering player) to ((Triggering player) start location) over 1.00 seconds

Hm, how many players do you have. Cause i was pretty sure that you couldn't detect it, since everyone uses button[1,2,3,5,,,,] However, problems are caused when you wish to create something not at it's start location but on a rect instead. You could name it 1 and use player player number of triggering player but still.
But, if you say it works, it must do. Unless you're lying ofcourse, but i don't think so :8