HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Dialogs Advanced Help - No stupid answers plz

12-13-2003, 04:17 PM#1
Dead-Inside
*Bows* My name's Dead-Inside.
Me and LegolasArcher11 are working on this map called Economic Empire Saga. (Is found in two threads on this forum. Use search if you need them). I was making a Trade-dialog-system and I have now ran in to some MAJOR *** pain problems.

My thinking was this. At the start of the map, all dialogs are set up (Using waits and not doing it on Map Initialization to avoid lagg and bugs). The dialogs are quite massive since they contain 3-6 options per dialog, there are 5 different dialogs, and 4 different players to view them. Making it 20 dialogs in total and a rough 95 buttons.

I don't know if the sheer size would be the problem. But if it is, that sucks, and it doesn't suck a little bit. I have the trading dialogs all set up in a dialog array, called TradeDialog[x]. I have my buttons set up in 4 different arrays, called TradeDialogButtonArray1, 2, 3 and 4[x].

Now, when these are all set up, I show them using "Esc", aka, skip cinematic sequence. This all works, TradeDialog[1] shows for Player 1 (Red). Now, here's where the problem starts. When any button is pressed, nothing happens... The dialog is hid, but nothing happens, no new dialog shows up, no nothing... Here's some copied triggers:
SetThisUp (Outtake) (Waits are 0.30 between every dialog being set up)
Code:
Events
Time - Elapsed game time is 0.40 seconds
Actions
Dialog - Change the title of TradeDialog[1] to Which clan or broth...
Dialog - Create a dialog button for TradeDialog[1] labelled Farmland
Set TradeDialogButtonArray1[7] = (Last created dialog Button)
Dialog - Create a dialog button for TradeDialog[1] labelled Iron Ore
Set TradeDialogButtonArray1[8] = (Last created dialog Button)
Dialog - Create a dialog button for TradeDialog[1] labelled Blackleaf Clan
Set TradeDialogButtonArray1[9] = (Last created dialog Button)
TradingOpen
Code:
Events
Player - Player 1 (Red) skips a cinematic sequence
Player - Player 4 (Purple) skips a cinematic sequence
Player - Player 7 (Green) skips a cinematic sequence
Player - Player 10 (Light Blue) skips a cinematic sequence
Actions
If ((Triggering player) Equal to Player 1 (Red)) then do (Dialog - Show TradeDialog[1] for Player 1 (Red)) else do (Do nothing)
If ((Triggering player) Equal to Player 4 (Purple)) then do (Dialog - Show TradeDialog[2] for Player 4 (Purple)) else do (Do nothing)
If ((Triggering player) Equal to Player 7 (Green)) then do (Dialog - Show TradeDialog[3] for Player 7 (Green)) else do (Do nothing)
If ((Triggering player) Equal to Player 1 (Light Blue)) then do (Dialog - Show TradeDialog[4] for Player 10 (Light Blue)) else do (Do nothing)
DialogOne 1 (This is what responds to clicks on TradeDialog[1])
Code:
Events
    Dialog - A dialog button is clicked for TradeDialog[1]
Actions
    Dialog - Hide TradeDialog[1] for Player 1 (Red)
    If ((Clicked dialog button) Equal to TradeDialogButtonArray1[7]) then do (Set TradeDialogTempNumberArray[1] = 2) else do (Do nothing)
    If ((Clicked dialog button) Equal to TradeDialogButtonArray1[8]) then do (Set TradeDialogTempNumberArray[1] = 3) else do (Do nothing)
    If ((Clicked dialog button) Equal to TradeDialogButtonArray1[9]) then do (Set TradeDialogTempNumberArray[1] = 4) else do (Do nothing)
    Dialog - Show TradeDialog[5] for Player 1 (Red)

Those are the triggers. TradeDialog[5] Never fires. Also, waits doesn't seem to fix the problem. I tried adding from 0.4 waits to 2 x 2 second waits.

Does anyone have ANY clue WHY it would not fire?

Regards
Dead-Inside
12-13-2003, 04:21 PM#2
RaGiN_Bacon
your trying to get a new dialog to come up after one botton is pressed?
12-13-2003, 04:25 PM#3
Dead-Inside
I said no stupid replies. I require someone who knows about this and can tell me what wrongdoing I did. The triggers say all that is needed to be said. It's not a problem what my triggers are SUPOSE to do, that is clearly stated if you look at them. The problem is why they are not doing it...

Regards
Dead-Inside
12-13-2003, 04:29 PM#4
RaGiN_Bacon
Aight for one i was trying to clear something up so I could help for 2 I know about this because I did a 4 menu long 3 botton for each dialog on a map and i also use dialogs alot... So if you dont want help dont ask people for it.
12-13-2003, 04:50 PM#5
Shark
try breaking it into smaller triggers, so when one dialog button is pressed, it runs another trigger that will run the second dialog box with it's buttons
also use the 1 second wait, cuz 1 sec isn't that long, since u need to decide what will you trade for how much gold (u'r building a trade system, right ?) and i guess u'll have to think for each decision about 5-6 secs, so part of a 1 sec delay could be blamed on lag :))

i know sometimes my triggers won't fire cuz the wait is too small, so i tend to use 1 sec delay as a minimal waiting delay....
12-13-2003, 04:52 PM#6
Spinally
+ Make a text message appear in each separate trigger to see if it is actually firing, alas, thats my way of debugging.
12-13-2003, 04:53 PM#7
weaaddar
Arrays don't work in events luanched at map initilization (which is every single event created with Worldedit) , didn't you know that?
The workaround is to use custom text and copy the event which uses the array to a trigger which is launched after map initilization. (you can use that nifty custom script option to)

I have a question if his question is dumb, what is yours?
12-13-2003, 05:50 PM#8
Dead-Inside
What are you talking about? Where do I fire arrays on map initialization?

Oh... Wait a sec, man... I really have to come back to these forums, I miss the daily "bug reports". Isn't this where you need to cap the arrays? And before TFT, you couldn't, and you had to loop it in a custom trigger at map start? Please correct me if I'm wrong.

Thanks to your responses, btw.
Oh, and sorry RaGiN_Bacon, but it was a stupid question since it all says in the three triggers I posted.

Regards
Dead-Inside
12-13-2003, 05:54 PM#9
LegolasArcher
He was talking about
Quote:
At the start of the map

And, he means at .01 seconds, not map initialization. Just my 2 cents.
12-13-2003, 07:50 PM#10
Dead-Inside
So does anyone have a confirmation to give me or what?
12-13-2003, 08:49 PM#11
weaaddar
All events automatically are added at a function that runs at map initilization. (TRUST ME).

Your events have other conditions, but the event defining function runs at map initilization.
Dialog Arrays unfortuantly even when capped, (which you should do) will still not run at initilization due to a bug blizzard has. Thats why you should get this event and copy it to a trigger which runs at .1 seconds or something like that.
Upload your map and I'll fix it for you because clearly my answer was stupid, or you're a raging retard.
12-13-2003, 09:10 PM#12
HyperNox
Use loops it makes it much easier to view and/or edit, or have you still got RoC? if so get tft... And its hard to see whats wrong when we cant see the all of the tirggers regarding the dialoges it could be a very small thing in another trigger that causes the problem.
12-13-2003, 09:44 PM#13
weaaddar
Loops wouldn't much matter,there for optimization, its because arrays aren't recognized in events normally like I've said.
12-13-2003, 10:05 PM#14
Dead-Inside
Thats why you should get this event and copy it to a trigger which runs at .1 seconds or something like that.

Excuse me, get *what* event and copy to *what*?

I never used anything on the actual event Map Initialization, but I'm guessing that's not what you're talking about?

From what "the raging retard" (This from a man whom I respected) understands, you're saying that my detection of a button is clicked event does not work because it does not identify my event for the trigger?

Okay, great, so how do I fix this?

And, you think I'd upload a map with 20 hours work in to it? It's not that I don't trust you, but you're not the only one around here...

Regards
Dead-Inside
12-13-2003, 10:25 PM#15
HyperNox
When I was talking about loops, I said it cuz it makes things clearer to view the trigger when its in a loop

I use a dialoge for KP I use it for a help system I wouldn't been able to create it if I hadn't used loops:
Code:
Dialoge
    Events
        Time - Elapsed game time is 0.50 seconds
    Conditions
    Actions
        -------- Help Dialog --------
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Dialog - Change the title of Help[(Integer A)] to |cff00ff00Help Menu...
                Dialog - Create a dialog button for Help[(Integer A)] labelled Troops
                Set HelpButton_Troops[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Help[(Integer A)] labelled Gold
                Set HelpButton_Gold[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Help[(Integer A)] labelled Hero Death
                Set HelpButton_HeroDeath[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Help[(Integer A)] labelled Items
                Set HelpButton_Items[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Help[(Integer A)] labelled Mecrenaries
                Set HelpButton_Mercenaries[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Help[(Integer A)] labelled Barrow Dens
                Set HelpButton_BarrowDens[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Help[(Integer A)] labelled Important Items
                Set HelpButton_ImptItems[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Help[(Integer A)] labelled Walls
                Set HelpButton_Walls[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Help[(Integer A)] labelled Terrain
                Set HelpButton_Terrain[(Integer A)] = (Last created dialog Button)
                Dialog - Create a dialog button for Help[(Integer A)] labelled MultiBoard
                Set HelpButton_MultiBoard[(Integer A)] = (Last created dialog Button)
and thats 10 x 10 = 100 buttons...