Dialog Issue

sjakie

Cookie Be Awesome!
Reaction score
127
I´m trying to make a dialog. Everything went well, it worked, untill I moved the trigger to an other map. It suddently started acting weird.
My question is:

If a trigger has an event that starts the trigger when a dialog button is clicked and a condition saying the clicked button has to be equal to a variable, but the variable hasent been set yet, would that disable the condition and run the trigger when any dialog button is clicked?

triggers:

Modepick (initialy on)
Code:
Events
    Time - Elapsed game time is 1.00 seconds
Conditions
Actions
    Dialog - Clear RedDialog
    Dialog - Create a dialog button for RedDialog labelled Free For All
    Set FFAbutton = (Last created dialog Button)
    Dialog - Create a dialog button for RedDialog labelled Team Battle
    Set Teambutton = (Last created dialog Button)
    Dialog - Change the title of RedDialog to Pick a game mode:
    Dialog - Show RedDialog for Player 1 (Red)

FFAmode (initialy on)
Code:
Events
    Dialog - A dialog button is clicked for RedDialog
Conditions
    (Clicked dialog button) Equal to FFAbutton
Actions
    Game - Display to (All players) the text: ((Name of (Triggering player)) +  has chosen Free For All Mode!)
    Dialog - Hide RedDialog for Player 1 (Red)
    Dialog - Clear RedDialog
    Trigger - Run Timeset <gen> (checking conditions)

Teammode (initialy on)
Code:
Events
    Dialog - A dialog button is clicked for RedDialog
Conditions
    (Clicked dialog button) Equal to Teambutton
Actions
    Game - Display to (All players) the text: ((Name of (Triggering player)) +  has chosen Team Mode!)
    Dialog - Hide RedDialog for Player 1 (Red)
    Dialog - Clear RedDialog
    Trigger - Run Timeset <gen> (checking conditions)

Timeset (initialy off)
Code:
Events
Conditions
Actions
    Dialog - Change the title of RedDialog to Choose the game len...
    Dialog - Create a dialog button for RedDialog labelled 15 minutes
    Set fifteenminutes = (Last created dialog Button)
    Dialog - Create a dialog button for RedDialog labelled 30 minutes
    Set thirtyminutes = (Last created dialog Button)
    Dialog - Create a dialog button for RedDialog labelled 45 minutes
    Set fourtyfiveminutes = (Last created dialog Button)
    Dialog - Create a dialog button for RedDialog labelled One hour
    Set onehour = (Last created dialog Button)
    Dialog - Show RedDialog for Player 1 (Red)

15minutes (initialy on)
Code:
Events
    Dialog - A dialog button is clicked for RedDialog
Conditions
    (Clicked dialog button) Equal to fifteenminutes
Actions
    Dialog - Hide RedDialog for Player 1 (Red)
    Game - Display to (All players) the text: ((Name of (Triggering player)) +  has chosen the game to last 15 minutes!)
    Trigger - Run Red Dialog <gen> (checking conditions)

30minutes (initialy on)
Code:
Events
    Dialog - A dialog button is clicked for RedDialog
Conditions
    (Clicked dialog button) Equal to thirtyminutes
Actions
    Dialog - Hide RedDialog for Player 1 (Red)
    Game - Display to (All players) the text: ((Name of (Triggering player)) +  has chosen the game to last 30 minutes!)
    Trigger - Run Red Dialog <gen> (checking conditions)

45minutes (initialy on)
Code:
Events
    Dialog - A dialog button is clicked for RedDialog
Conditions
    (Clicked dialog button) Equal to fourtyfiveminutes
Actions
    Dialog - Hide RedDialog for Player 1 (Red)
    Game - Display to (All players) the text: ((Name of (Triggering player)) +  has chosen the game to last 45 minutes!)
    Trigger - Run Red Dialog <gen> (checking conditions)

onehour (initialy on)
Code:
Events
    Dialog - A dialog button is clicked for RedDialog
Conditions
    (Clicked dialog button) Equal to onehour
Actions
    Dialog - Hide RedDialog for Player 1 (Red)
    Game - Display to (All players) the text: ((Name of (Triggering player)) +  has chosen the game to last one hour!)
    Trigger - Run Red Dialog <gen> (checking conditions)

Red Dialog (initialy off)
Code:
Events
Conditions
Actions
    Dialog - Clear RedDialog
    Dialog - Change the title of RedDialog to Choose your race:
    Dialog - Create a dialog button for RedDialog labelled Orc
    Set Redorc = (Last created dialog Button)
    Dialog - Create a dialog button for RedDialog labelled Undead
    Set Redundead = (Last created dialog Button)
    Dialog - Create a dialog button for RedDialog labelled Night Elf
    Set Rednightelf = (Last created dialog Button)
    Dialog - Create a dialog button for RedDialog labelled Centaur
    Set Redcentaur = (Last created dialog Button)
    Dialog - Create a dialog button for RedDialog labelled Quillboar
    Set Redquillboar = (Last created dialog Button)
    Dialog - Create a dialog button for RedDialog labelled Troll
    Set Redtroll = (Last created dialog Button)
    Dialog - Create a dialog button for RedDialog labelled Human
    Set Redhuman = (Last created dialog Button)
    Dialog - Create a dialog button for RedDialog labelled Goblin
    Set Redgoblin = (Last created dialog Button)
    Dialog - Show RedDialog for Player 1 (Red)

Redtroll (initialy on)
Code:
Events
    Dialog - A dialog button is clicked for RedDialog
Conditions
    (Clicked dialog button) Equal to Redtroll
Actions
    Dialog - Hide RedDialog for Player 1 (Red)
    Unit - Order Unit to train/upgrade (myhouse) to a Hut

Redcentaur (initialy on)
Code:
Events
    Dialog - A dialog button is clicked for Reddialog
Conditions
    (Clicked dialog button) Equal to Redcentaur
Actions
    Dialog - Hide RedDialog for Player 1 (Red)
    Unit - Order Unit to train/upgrade (myhouse) to a Tent

Redquillboar (initialy on)
Code:
Events
    Dialog - A dialog button is clicked for RedDialog
Conditions
    (Clicked dialog button) Equal to Redquillboar
Actions
    Dialog - Hide RedDialog for Player 1 (Red)
    Unit - Order Unit to train/upgrade (myhouse) to a Tent

Redhuman (initialy on)
Code:
Events
    Dialog - A dialog button is clicked for RedDialog
Conditions
    (Clicked dialog button) Equal to Redhuman
Actions
    Dialog - Hide RedDialog for Player 1 (Red)
    Unit - Order Unit to train/upgrade (myhouse) to a House

Redundead (initialy on)
Code:
Events
    Dialog - A dialog button is clicked for RedDialog
Conditions
    (Clicked dialog button) Equal to Redundead
Actions
    Dialog - Hide RedDialog for Player 1 (Red)
    Unit - Order Unit to train/upgrade (myhouse) to a Ziggurat

Rednightelf (initialy on)
Code:
Events
    Dialog - A dialog button is clicked for RedDialog
Conditions
    (Clicked dialog button) Equal to Rednightelf
Actions
    Dialog - Hide RedDialog for Player 1 (Red)
    Unit - Order Unit to train/upgrade (myhouse) to a Barrow Den

Redorc (initialy on)
Code:
Events
    Dialog - A dialog button is clicked for RedDialog
Conditions
    (Clicked dialog button) Equal to Redorc
Actions
    Dialog - Hide RedDialog for Player 1 (Red)
    Unit - Order Unit to train/upgrade (myhouse) to a Orc Burrow

Redgoblin (initialy on)
Code:
Events
    Dialog - A dialog button is clicked for RedDialog
Conditions
    (Clicked dialog button) Equal to Redgoblin
Actions
    Dialog - Hide RedDialog for Player 1 (Red)
    Unit - Order Unit to train/upgrade (myhouse) to a Laboratory

Ok, let me add this:
-(myhouse) is the house that is upgraded.

-Its the top houseupgrade trigger that is ran first, in this case that would be Troll. So after I pressed FFAmode, a Hut would be made instead if me getting to see the timedialog.

-All variables exist.
 

Exide

I am amazingly focused right now!
Reaction score
448
I believe nothing will happen, if the variables hasn't been set.
When moving triggers from a map to another, there's an option that you can check in WE, under Preferences, called something similar to 'Automatically write unknown variables'. -Check that option, then copy your trigger again, and it should work. :p
 

sjakie

Cookie Be Awesome!
Reaction score
127
But I DID set the variables (well, they set themselves, but still).
I have a couple of triggers than create a certain house when you press a certain button. After pressing the first button (I have 3 different dialogs) the a house is created, what should happen till after the third dialog.

It always builds the house from the trigger that is the most up in the list, and it appears to run all these triggers from the top to the bottom of the list after I press any dialog button. Because it happens after I press any dialog button, I think its the condition causing the trouble.
 

Exide

I am amazingly focused right now!
Reaction score
448
Show us your triggers, then. :p
 

sjakie

Cookie Be Awesome!
Reaction score
127
Its kinda late and its kinda much copying and pasting. Ill post them tomorrow :D
 

sjakie

Cookie Be Awesome!
Reaction score
127
Added the triggers. Since I suck at dialogs, I bet it is something really easy that is going wrong, so you should be able to filter it out right away.

Well.....right away.....have fun reading :D
Enlighten me please.
 

mushroom911

I think I should change my avatar
Reaction score
43
why the spoiler?

and variables dont set themselves u need to recreate them...
thats my only guess atm, recreat teh variables, might want to custom script... nvm
 

sjakie

Cookie Be Awesome!
Reaction score
127
why the spoiler?

and variables dont set themselves u need to recreate them...
thats my only guess atm, recreat teh variables, might want to custom script... nvm

Why the spoiler? You fancy one and a half page if glibberish instead? :p
But sure, I'll recreate the variables, but the variable list says I already have them so I dont think it will make much difference.
 

Exide

I am amazingly focused right now!
Reaction score
448
Well, it's nothing wrong with your triggers.
So something must've gone wrong during the copy+paste.

When using custom made abilities in triggers, and then removing the ability, the trigger messes up in a way I can't really explain. -What I do about that is to either remove the function using the ability completely, and adding it again, OR double-clicking it and set another ability.
Maybe this is the case for you.. In a weird, sort of way.
Try double clicking on all your variable-dependant functions and change into another variable, then click Ok. Then do it all over and change BACK to the original variable, so that the Editor really understands what variable it should be using.
To be extra sure you might want to save the map in between, as well.

Not sure that will help, though. :(
Worth a try, anyway.
 

sjakie

Cookie Be Awesome!
Reaction score
127
I remade all the variables, but no difference. I stilll got the same problem. The timedialog still wont even pop up. Not using any custom abilities in it, so that wont be the problem.
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
Hm... Bad way of creating dialogs.
Upload the map...?

Or make it a bit more like this:

Choose Time, only 1 player, player red.
Code:
Timer
    Events
        Time - Elapsed game time is 0.10 seconds
    Conditions
    Actions
        Dialog - Change the title of dialogtimer to Set Time
        Dialog - Create a dialog button for dialogtimer labelled 15 
        Set buttons[1] = (Last created dialog Button)
        Dialog - Create a dialog button for dialogtimer labelled 30
        Set buttons[2] = (Last created dialog Button)
        Dialog - Create a dialog button for dialogtimer labelled 45
        Set buttons[3] = (Last created dialog Button)
        Dialog - Create a dialog button for dialogtimer labelled 60
        Set buttons[4] = (Last created dialog Button)
        Dialog - Show dialogtimer for Player 1 (Red)

Sets the time choosen in a real variable named "Real_Time"
Code:
TimerChosen
    Events
        Dialog - A dialog button is clicked for dialogtimer
    Conditions
    Actions
        For each (Integer B) from 1 to 4, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Clicked dialog button) Equal to buttons[(Integer B)]
                    Then - Actions
                        Set Real_Time = ((Real((Integer B))) x 15.00)
                        Game - Display to (Player group((Triggering player//OR All Players))) the text: (Time chosen:  + (String(Real_Time)))
                    Else - Actions

Due to the event in this trigger, this trigger runs also, but with a little wait just for the fun of it...
Code:
HeroDialog
    Events
        Dialog - A dialog button is clicked for dialogtimer
    Conditions
    Actions
        Wait 0.10 seconds
        Set heroes[3] = Demon Hunter
        Set heroes[4] = Blademaster
        Dialog - Change the title of dialoghero to Pick a hero!
        Dialog - Create a dialog button for dialoghero labelled DemonHunter
        Set buttons[3] = (Last created dialog Button)
        Dialog - Create a dialog button for dialoghero labelled Blademaster
        Set buttons[4] = (Last created dialog Button)
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Dialog - Show dialoghero for (Picked player)

Code:
HeroButtons
    Events
        Dialog - A dialog button is clicked for dialoghero
    Conditions
    Actions
        For each (Integer A) from 3 to 4, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Clicked dialog button) Equal to buttons[(Integer A)]
                    Then - Actions
                        Unit - Create 1 heroes[(Integer A)] for (Triggering player) at (Center of (Playable map area)) facing Default building facing degrees
                    Else - Actions

This one creates the heroes...for any player..

Edit:Variables used:
buttons - Dialog Buttons, array? Yes
dialogtimer - Dialog, array? No
dialoghero - Dialog, array? No
heroes - Unit-Type, array? Yes
Real_Time - Real, array? No

Yes, you can put trigger 2 and 3 inside one...but don't.
Why I start with "heroes[3]" for the heroes and not 1? To confuse you.
 

sjakie

Cookie Be Awesome!
Reaction score
127
Ok...silly old me thinking dialogs were easy, but theres always someone spoiling the fun:D
I happened to have followed a wrong tutorial I gues, I'll try to fix em in your way.
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
>>I happened to have followed a wrong tutorial
*Curious* Which one?

>>dialogs were easy
They are.
 

sjakie

Cookie Be Awesome!
Reaction score
127
>>I happened to have followed a wrong tutorial
*Curious* Which one?

>>dialogs were easy
They are.

1: Dunno acualy. I was browsing warcraft sites and happened to pass a dialog tut. I needed a dialog for my map, so I decided to make it. Looked ok and triggers worked, so I didnt suspect it of sucking.

2: In that case you're making it look more difficult than it is, cuz this glibberish made me scratch my head twice.:nuts::D
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top