• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

massive dialog issues very tough :(

Status
Not open for further replies.
Level 1
Joined
Jan 22, 2008
Messages
3
ok what im trying to acomplish here is a kind-of-not-reall-for-me simple dialog where you take two players and bet money on the victor. There are two main dialogs, one for chosing who you think will win, and the other for how much money you want to bet on him.

The first dialog window is called "whowinz" with no array, dunno if that does anything.

It has two options, light player, dark player.

Once you click a button (or a set time passes) the dialog closes and the second one pops open, called "selectbet" Selectbet has 4 options, im adding one unorthidox option here.

50gold bet, 100gold bet, 150gold bet, and the new one, all in (<- think poker here)

anyway, my problems range from the buttons not showing to the gold not being given after the duel and im cool with the latter i can figure that out but people here have greatly helped me in the past so before i completly screw up a good hours work i want to run this by you guys and tell me what you think.

They are a bit long because i have a knack for makin things more complex then needed... These triggers probobly leak like hell too... ><


NOTE* My biggest fear is in triggers like this one right here:
  • Events
    • Dialog - A dialog button is clicked for whowinz
  • (actions) Dialog - Hide whowinz for (Triggering player)
Why you might wonder? because of two reasons. One: there is no dialog event that refers to a specific player pressing a button, and i have 8 players to worry about.
The second: I have to assume the game keeps track of which player clicks what so therefore i use (hesitantly) triggering player in actions... I am very skeptical this is part of the trigger that works.

But enough with me rambling please look at the coding for yourself
  • betting on side
    • Events
      • Unit - A unit enters DUELING LOS <gen>
    • Conditions
      • betting Equal to True
    • Actions
      • Quest - Display to (All players) the Hint message: All players not in ...
      • Dialog - Clear whowinz
      • Dialog - Change the title of whowinz to Which side do you w...
      • Dialog - Create a dialog button for selectbet labelled Light side
      • Set ichooselight[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for selectbet labelled Dark side
      • Set ichoosedark[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for selectbet labelled Neither side
      • Dialog - Show whowinz for Player 1 (Red)
      • Dialog - Show whowinz for Player 2 (Blue)
      • Dialog - Show whowinz for Player 3 (Teal)
      • Dialog - Show whowinz for Player 4 (Purple)
      • Dialog - Show whowinz for Player 5 (Yellow)
      • Dialog - Show whowinz for Player 6 (Orange)
      • Dialog - Show whowinz for Player 7 (Green)
      • Dialog - Show whowinz for Player 8 (Pink)
      • Dialog - Show whowinz for Player 9 (Gray)
      • Dialog - Show whowinz for Player 10 (Light Blue)
      • Wait 6.00 seconds
      • Player Group - Pick every player in (All players) and do (Dialog - Hide whowinz for (Picked player))
  • betting gold on light side
    • Events
      • Dialog - A dialog button is clicked for whowinz
    • Conditions
      • (Clicked dialog button) Equal to ichooselight[1]
    • Actions
      • Dialog - Hide whowinz for (Triggering player)
      • Dialog - Clear selectbet
      • Dialog - Change the title of selectbet to How much to you wan...
      • Dialog - Create a dialog button for selectbet labelled I'm not so sure...5...
      • Set bet50[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for selectbet labelled I'm kind of sure......
      • Set bet100[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for selectbet labelled I'm very sure! 150 ...
      • Set bet150[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for selectbet labelled Im so sure, ill bet...
      • Set betall[4] = (Last created dialog Button)
      • Dialog - Show selectbet for Player 1 (Red)
      • Dialog - Show selectbet for Player 2 (Blue)
      • Dialog - Show selectbet for Player 3 (Teal)
      • Dialog - Show selectbet for Player 4 (Purple)
      • Dialog - Show selectbet for Player 5 (Yellow)
      • Dialog - Show selectbet for Player 6 (Orange)
      • Dialog - Show selectbet for Player 7 (Green)
      • Dialog - Show selectbet for Player 8 (Pink)
      • Dialog - Show selectbet for Player 9 (Gray)
      • Dialog - Show selectbet for Player 10 (Light Blue)
Now the dark betting is the same procedure as the light with just names changed so i wont post that... moving on to the actual betting. I keep track of it all with variables as integers btw

  • bet is 50 gold
    • Events
      • Dialog - A dialog button is clicked for selectbet
    • Conditions
      • (Clicked dialog button) Equal to bet50[1]
    • Actions
      • Player - Add (0 - 50) to (Triggering player) Current gold
      • Set playerbet1 = 50
  • bet is 100 gold
    • Events
      • Dialog - A dialog button is clicked for selectbet
    • Conditions
      • (Clicked dialog button) Equal to bet100[2]
    • Actions
      • Player - Add (0 - 100) to (Triggering player) Current gold
      • Set playerbet1 = 100
  • bet is 150 gold
    • Events
      • Dialog - A dialog button is clicked for selectbet
    • Conditions
      • (Clicked dialog button) Equal to bet150[3]
    • Actions
      • Player - Add (0 - 150) to (Triggering player) Current gold
      • Set playerbet1 = 150
now for the doosy... i got no idea how to keep track of the all in option and i really want to keep it so i tried. I made a separate variable to =a players gold count and then had the other variable to equal that one. But im not sure if that works. :/ like this

  • fortheallbet1
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set betallpicked = ((Triggering player) Current gold)
  • bet is all your gold
    • Events
      • Dialog - A dialog button is clicked for selectbet
    • Conditions
      • (Clicked dialog button) Equal to betall[4]
    • Actions
      • Set playerbet1 = betallpicked
      • Player - Set (Triggering player) Current gold to 0


Now if noone sees any major errors there awsome. But now im stumped because my next step is pretty big and to be honest , way over my head...

I want to be able to determine the victor of the duel against the two players and based on the outcome return double the money wagered to the player or nothing at all... Might sound easy at first but im having issues figuring it out.
 
Last edited:
Status
Not open for further replies.
Top