HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Triggers aren't working like I thought...

09-11-2004, 09:57 PM#1
Radu
I need two kinda of triggers for the map I am making. I could use any help I can get, I've tried doing it, but it doesn't seem to be working.

I need create two dialog boxes

First one will be choice of Male, Female

Second will be Int, Str, Agi basicly.

I am making it so that people will be able to customize there main hero better.(No they dont get to choose abilities, those will be based on what there primial is(Agi, Str, Int.)

Thanks, Let me know..
09-11-2004, 10:50 PM#2
oNdizZ
Well as far as i know it can only be 1 dialog box at the time, and only for 1 player at the time. I've also noticed that all other triggers freezes when a dialog box appears...

you should try ask some1 who's good at JASS. I think there's some jass-code for that but i cant remember :p
09-11-2004, 10:50 PM#3
-={tWiStÄr}=-
events -
elapsed game time = .01 seconds
conditions-
actions-
set Genderdialogue = Create dialogue
set button 1 for GenderDialogue = "Male"
set Gender[i] = Last Created Dialogue Button
set button 2 for GenderDialogue = "Female"
set Gender[2] = Last Created Dialogue Button

then have another trigger
Events-
Dialogue button is clicked for GenderDialogue
Conditions-
Actions-
If Clicked Dialogue button is equal to Gender[1] then {do actions for male} else do nothing
If Clicked Dialogue button is equal to Gender[1] then {do actions for female} else do nothing

do the same thing for the int str agi one.
09-12-2004, 12:57 AM#4
SpadeZ
Twistar has basically told you everything essential that you need to know. Thumbs up for twistar. But you should replace:
Code:
If Clicked Dialogue button is equal to Gender[1] then {do actions for male} else do nothing
If Clicked Dialogue button is equal to Gender[1] then {do actions for female} else do nothing

with

Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Clicked dialog button) Equal to Gender[1]
    Then - Actions
    Else - Actions

[u]and[/u]

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Clicked dialog button) Equal to Gender[2]
    Then - Actions
    Else - Actions

I always find using the multiple action if/then/else alot easier than the single action.
09-12-2004, 01:04 AM#5
-={tWiStÄr}=-
well.. not when you have a lot and theres only 1 action. and your way doesnt work, theres no way for button 1 and 2 to be clicked at the same time if they arent the same button.
OH! oops i typed trigger in wrong.
If Clicked Dialogue button is equal to Gender[1] then {do actions for female} else do nothing
should be
If Clicked Dialogue button is equal to Gender[2] then {do actions for female} else do nothing
09-12-2004, 01:20 AM#6
SpadeZ
I was assuming that he had to do alot of triggers. It wouldn't really matter even if he had one action, it would still work.

Yea you had a little typo in the gender part. I didn't realise untill you pointed it out.