i made a dialog and it is being shown to the players, but when the player press a button for ex. "Human" there should spawn a Peasant. I tried many things but i cant make a peasant spawn.
Events: --- Time - Elasped game time is 2.00 seconds conditions: --- - actions: --- Dialog - Create a Dialog button for "Variable1" labelled "Human" --- Dialog - Show "Variable1" for "Player 1" (Red)
the problem is that you did not assign a variable to the dialog button. when you do that, change the condition in trigger 2 to "condition: clicked dialog button equal to <your variable>. This is a common problem. Try to find a little more out about something before posting a question here.[/code]
Unit - Create 1 peasant for (Picked player) at ((Picked player) start location) facing ((Picked player) start location)
You can't use "picked player" for this action. "picked player" always refers to the "player - pick all players..."-action. Try using "Event Response - Triggering Player". I'm not quite sure though.
Events: --- Time - Elasped game time is 2.00 seconds conditions: --- - actions: --- Dialog - Create a Dialog button for "Variable1" labelled "Human" --- Dialog - Show "Variable1" for "Player 1" (Red)
Events: --- Dialog - A dialog button is clicked for "Variable1" Conditions: --- (Clicked dialog button) equal to "Human" Actions: --- Unit - Create 1 peasant for (Picked player) at ((Picked player) start location) facing ((Picked player) start location)... i still dont know what to do here.. i cant find that event responce...
variable1: i made this in the variables menu.. and i made the initial value to "New dialog button" variable2: i made this initial value to "last created dialog button"-... as i was told in another turioal...
td-proo--- Dialog - Create a Dialog button for "Variable1" labelled "Human" --- Dialog - Show "Variable1" for "Player 1" (Red)
That's where your problem lies. Like birdofprey160 said, you didnt assign the button to the variable. So, it should say
--- Dialog - Create a Dialog button for "Variable1" labelled "Human" --- Set "Variable2" = Last Created Dialog Button --- Dialog - Show "Variable1" for "Player 1" (Red)
EDIT: Oh, and I'm not sure where you got Human from here: Conditions: --- (Clicked dialog button) equal to "Human" That should be "Variable2".
td-proo, you can copy your entire trigger as text and paste it in by right-clicking the name of the trigger in the editable window and pasting it into [code] tags.
Dialog - Change the title of Player_choose_unit to "Choose a unit" Dialog - Create a dialog button for Player_choose_unit labelled "human" Set user_chose_human_Btn = (Last created dialog Button) Dialog - Show Player_choose_unit for Player 1 (Red)
Second Trigger:
Event: Dialog - A dialog button is clicked for Player_choose_unit
Condition: (Clicked dialog button) Equal to user_chose_human_Btn