cant figure out the prob..

killerbf1

New Member
Reaction score
2
alright this is gonna look messy, but its a work in progress. If you need me to upload the map to get a better look at what i need help with, dont be afraid to ask. The prob. at the start of the game a dialog will appear asking your sex, then another will appear branched off of that asking your race, then depending on your race, another dialog will appear asking your primary attribute, then another dialog will appear based on your att. asking what god you want, then one final dialog will appear asking if the settings are ok or if you want to reset. Im useing interger vars to keep track of the answers, I.E. Male = 1, Human = 2, Int = 1, God one = 1. Then to spawn the char, it uses the vars to make it. So if you picked male, human, int, god one, you will get a different char then if you picked female, human, int, god one. now i will post all of the codes i have so far, i spent the last hour trying to figure out what i did wrong, but i just cant. the hero wont spawn.

Code:
ChooseSex
    Events
        Time - Elapsed game time is 2.00 seconds
    Conditions
        (Player 1 (Red) slot status) Equal to Is playing
    Actions
        Dialog - Create a dialog button for redsex labelled Male
        Dialog - Change the title of redsex to ChooseYour Sex
        Set Male = (Last created dialog Button)
        Set Sex = 1
        Dialog - Show redsex for Player 1 (Red)
        Dialog - Create a dialog button for redsex labelled Female
        Set Female = (Last created dialog Button)
        Set Sex = 2
        Dialog - Show redsex for Player 1 (Red)

Code:
Malered
    Events
        Dialog - A dialog button is clicked for redsex
    Conditions
        (Clicked dialog button) Equal to Male
    Actions
        Dialog - Create a dialog button for redrmalerace labelled Dragon
        Dialog - Change the title of redrmalerace to Choose Your Race
        Set Dragon = (Last created dialog Button)
        Set Race = 1
        Dialog - Show redrmalerace for Player 1 (Red)
        Dialog - Create a dialog button for redrmalerace labelled Human
        Set Human = (Last created dialog Button)
        Set Race = 2
        Dialog - Show redrmalerace for Player 1 (Red)
        Dialog - Create a dialog button for redrmalerace labelled Elf
        Set Elf = (Last created dialog Button)
        Set Race = 3
        Dialog - Show redrmalerace for Player 1 (Red)
        Dialog - Create a dialog button for redrmalerace labelled Demon
        Set Demon = (Last created dialog Button)
        Set Race = 4
        Dialog - Show redrmalerace for Player 1 (Red)
        Dialog - Create a dialog button for redrmalerace labelled Valtith
        Set Valtith = (Last created dialog Button)
        Set Race = 5
        Dialog - Show redrmalerace for Player 1 (Red)

Code:
Maleredhuman
    Events
        Dialog - A dialog button is clicked for redrmalerace
    Conditions
        (Clicked dialog button) Equal to Human
    Actions
        Dialog - Create a dialog button for redmalehuman labelled Endurence
        Dialog - Change the title of redmalehuman to Choose Your Attribu...
        Set Endurence = (Last created dialog Button)
        Dialog - Show redmalehuman for Player 1 (Red)
        Dialog - Create a dialog button for redmalehuman labelled Speed
        Set Speed = (Last created dialog Button)
        Dialog - Show redmalehuman for Player 1 (Red)
        Dialog - Create a dialog button for redmalehuman labelled Intelagence
        Set Intelgence = (Last created dialog Button)
        Dialog - Show redmalehuman for Player 1 (Red)

Code:
IntGod
    Events
        Dialog - A dialog button is clicked for redmalehuman
    Conditions
        (Clicked dialog button) Equal to Intelgence
    Actions
        Dialog - Create a dialog button for IntGod labelled Hino
        Dialog - Change the title of Endurencegod to Choose Your God
        Set Hino = (Last created dialog Button)
        Set Intelgod = 1
        Dialog - Show IntGod for Player 1 (Red)
        Dialog - Create a dialog button for IntGod labelled Gotas
        Set Gotas = (Last created dialog Button)
        Set Intelgod = 2
        Dialog - Show IntGod for Player 1 (Red)
        Dialog - Create a dialog button for IntGod labelled Zanars
        Set Zanars = (Last created dialog Button)
        Set Intelgod = 3
        Dialog - Show IntGod for Player 1 (Red)
        Dialog - Create a dialog button for IntGod labelled Yerious
        Set Yerious = (Last created dialog Button)
        Set Intelgod = 4
        Dialog - Show IntGod for Player 1 (Red)

Code:
Int
    Events
        Dialog - A dialog button is clicked for redmalehuman
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to Intelgence
            Then - Actions
                Set Typeredatt = 1
            Else - Actions
                Do nothing

Code:
ok
    Events
        Dialog - A dialog button is clicked for IntGod
    Conditions
        (Clicked dialog button) Equal to Hino
    Actions
        Dialog - Create a dialog button for Ok labelled Ok
        Dialog - Change the title of Ok to Are the settings ok?
        Set Okk = (Last created dialog Button)
        Dialog - Show Ok for Player 1 (Red)
        Dialog - Create a dialog button for Ok labelled Reset All
        Set reset = (Last created dialog Button)
        Dialog - Show Ok for Player 1 (Red)

Code:
MalehumanInt
    Events
        Dialog - A dialog button is clicked for Ok
    Conditions
        (Clicked dialog button) Equal to Okk
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Race Equal to 2
                Typeredatt Equal to 1
                Sex Equal to 1
            Then - Actions
                Unit - Create 1 Mage for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
            Else - Actions
                Do nothing
 

Alphabet

New Member
Reaction score
12
The problem seems to be that you set the integer variables when you create the buttons, not when a dialog button is clicked. Now the integers don't depend on what button was clicked.
I'll show you how the sex dialog should be, and hopefully you will manage to do the rest on your own.
Code:
CreateSexDialog
    Events
        Time - Elapsed game time is 2.00 seconds
    Conditions
        (Player 1 (Red) slot status) Equal to Is playing
    Actions
        Dialog - Change the title of redsex to ChooseYour Sex
        Dialog - Create a dialog button for redsex labelled Male
        Set Male = (Last created dialog Button)
        Dialog - Create a dialog button for redsex labelled Female
        Set Female = (Last created dialog Button)
        Dialog - Show redsex for Player 1 (Red)
Code:
ChooseSex
    Events
        Dialog - A dialog button is clicked for redsex
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked Dialog button) Equal to Male
            Then - Actions
                Set Sex = 1
            Else - Actions
                Set Sex = 2
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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