Dialog button problem

  • Thread starter Thread starter new bed
  • Start date Start date
N

new bed

Guest
okay. i followed ace heart's tutorial on how to create dialog boxes so ppl could choose heros in the beggining. everything works except for 1 minor detail. the names of heros are not exactly on the buttons except for 1st hero.

example of what im talking about:

Button1 - hero
2nd hero
button2
3rd hero
button3
4th hero
button4

You get the idea. I would like to direct your atttention to yet another detail. the names dont appear exactly between buttons which means that it might not be an integer problem. each hero after the first one is slightly higher on the button than they should be.

Any ideas ????
 
E-> Elasped time is 5 seconds
A-> Create Dialog Button For ( YOURDIALOG ) named Lady Vajsh
Set = ( Last created dialog button ) = ( YOURDIALOG 1 )
Create Dialog Button For ( YOURDIALOG ) named Illidian
Set = ( Last created dialog button ) = ( YOURDIALOG 2 )
Set title of ( YOURDIALOG ) to What Hero You wanna Choose?
Show ( YOURDIALOG )

==============
Player click Lady Vasjh dialog
==============
E->A button dialog is clicked
C-> Button Dialog clicked = YOURDIALOG1
A-> Create 1 Naga Witch Girl at ( you desired region ) for triggering player o.O
 
Startup Cenematic Boat4
Events
Unit - A unit enters Game Startup BoatMove4 <gen>
Conditions
(Unit-type of (Triggering unit)) Equal to Explore Ship
Actions
Wait 5.00 seconds
Camera - Reset camera for Player 1 (Red) to standard game-view over 0.00 seconds
Cinematic - Turn cinematic mode Off for (All players)
Dialog - Clear Choose_Hero
Dialog - Change the title of Choose_Hero to |cffff0000> >Choose...
Dialog - Create a dialog button for Choose_Hero labelled Blood Angels with hotkey: 1
Set BloodAngels = (Last created dialog Button)
Dialog - Create a dialog button for Choose_Hero labelled Holy Faiths with hotkey: 2
Set HolyFaiths = (Last created dialog Button)
Dialog - Create a dialog button for Choose_Hero labelled Sinators with hotkey: 3
Set HolyFaiths = (Last created dialog Button)
Dialog - Create a dialog button for Choose_Hero labelled Kronos with hotkey: 4
Set HolyFaiths = (Last created dialog Button)
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Dialog - Show Choose_Hero for (Picked player)



Don't mind the cenematic stuff and the event but that is how I lay mine out Can you post your exact trigger so we can have a look.
BrokenX
 
if you wan simple stuff .. make unit go to region .. i go to sleep gd night
 
Can you post your trigger here? I need to see it so I can see whats going wrong.



BrokenX
 
My triggers

Initialization
Events
Map initialization
Conditions
Actions
Melee Game - Remove creeps and critters from used start locations (for all players)
Visibility - Enable fog of war
Game - Turn the day/night cycle On
Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in 1000000000.00 seconds
Set Heroes[1] = Hunter
Set Heroes[2] = Beastmaster
Set Heroes[3] = Doctor
Set Heroes[4] = Wizard



Show Dialog
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Dialog - Clear HeroDialog
Dialog - Change the title of HeroDialog to Choose Your Hero
Dialog - Create a dialog button for HeroDialog labelled Hunter
Set DialogButtons[1] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog labelled BeastMaster
Set DialogButtons[2] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog labelled Doctor
Set DialogButtons[3] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog labelled Wizard
Set DialogButtons[4] = (Last created dialog Button)
Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
Loop - Actions
Dialog - Show HeroDialog for (Picked player)




Do Dialog
Events
Dialog - A dialog button is clicked for HeroDialog
Conditions
Actions
For each (Integer A) 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 DialogButtons[(Integer A)]
Then - Actions
Unit - Create 1 Heroes[(Integer A)] for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
Selection - Select (Last created unit) for (Triggering player)
Game - Display to (Player group((Triggering player))) the text: (Name of (Last created unit))
Else - Actions
 
My triggers

Initialization
Events
Map initialization
Conditions
Actions
Melee Game - Remove creeps and critters from used start locations (for all players)
Visibility - Enable fog of war
Game - Turn the day/night cycle On
Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in 1000000000.00 seconds
Set Heroes[1] = Hunter
Set Heroes[2] = Beastmaster
Set Heroes[3] = Doctor
Set Heroes[4] = Wizard

Show Dialog
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Dialog - Clear HeroDialog
Dialog - Change the title of HeroDialog to Choose Your Hero
Dialog - Create a dialog button for HeroDialog labelled Hunter
Set DialogButtons[1] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog labelled BeastMaster
Set DialogButtons[2] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog labelled Doctor
Set DialogButtons[3] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog labelled Wizard
Set DialogButtons[4] = (Last created dialog Button)
Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
Loop - Actions
Dialog - Show HeroDialog for (Picked player)

Do Dialog
Events
Dialog - A dialog button is clicked for HeroDialog
Conditions
Actions
For each (Integer A) 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 DialogButtons[(Integer A)]
Then - Actions
Unit - Create 1 Heroes[(Integer A)] for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
Selection - Select (Last created unit) for (Triggering player)
Game - Display to (Player group((Triggering player))) the text: (Name of (Last created unit))
Else - Actions
 
triggers

the above text includes 3 separate triggers each separated by a space
 
I don't get why you posted your instilization, this is very confusingly layed out... post it again but just the things that belong to the dialog.

BrokenX
 
initialization

the only reason why i posted initialization trigger wast to show you my values for heros (only last 4 lines affect the dialog). the next trigger (2nd) lays out the boxes (what players see, i think this is where the problem is). And the last trigger picks values so that once i click on "hunter" it would give me hunter.

I expect the problem to be in trigger 2.
Hmmm if this still doesnt clarify it you could look at Ace hearts tutorial, but dont if u dont have time.


[Respect]
 
Your problem is that your using an integer array for a dialog button. Unless you define the 1, 2, 3, and 4 as its own values, it doesnt know what to do with them. Since you only have 4, create 4 separate conditions for each button instead of 1 general one. Sure it makes the trigger a little bigger, but it is much more precise on its direction..

Hope that helps.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Real users can't really disable Javascript anymore these days.
  • Ghan Ghan:
    The internet is broken without it.
  • Ghan Ghan:
    Bot readable, not human usable.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    Check out the new Featured Content feature we apparently got with the forum software upgrade! https://www.thehelper.net/featured/
  • The Helper The Helper:
    Also on the bottom right side bar we now have a Trending Content Box!
    +1
  • The Helper The Helper:
    Not on the Headline News page just on the Forums page can we get that Featured and Trending on the home page?
  • Ghan Ghan:
    Since the home page is technically a forum, it now shows on all forum views. Still in the sidebar.
    +1
  • The Helper The Helper:
    Happy Friday! Hope everyone has a fantastic day and an even better weekend!
  • The Helper The Helper:
    Happy Sunday!
  • The Helper The Helper:
    I lovc that I can post webp and X links now! :)
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top