• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Could you plz see what i am doing wrong for my voteing kick

Status
Not open for further replies.
Level 21
Joined
Aug 21, 2005
Messages
3,699
You trigger is wrong.

  • Player 1
    • Events
      • Dialog - A dialog button is clicked for VoteDialog
    • Conditions
    • Actions
      • Dialog - Clear Player_1
      • Dialog - Change the title of Player_1 to Pleaze vote to kick...
      • Dialog - Create a dialog button for Player_1 labelled Yes kick him
      • Set VoteButton = (Last created dialog Button)
      • Dialog - Create a dialog button for Player_1 labelled No don't kick him
      • Set VoteButton = (Last created dialog Button)
      • For each (Integer A) from 1 to 12, do (Dialog - Show Vote for (Player((Integer A))))
      • Wait 15.00 seconds
      • If (VoteYes Greater than or equal to 4) then do (Game - Defeat Player 1 (Red) with the message: Defeat! You were v...) else do (Game - Display to (All players) the text: The vote falied so ...)
What you do is: you set "Votebutton" to the last created button TWICE, which means you inverted the votes. If you vote "no" 4 times, the player should be kicked.

Another problem you have: in your loop (for each integer A) you show "vote", which is an undefined (and thus empty) dialog box. Instead, you must do "show Player_1"

What to do to solve it: Change every "Player" trigger into:
  • Player 1
    • Events
      • Dialog - A dialog button is clicked for VoteDialog
    • Conditions
    • Actions
      • Dialog - Clear Player_1
      • Wait 0,01 seconds
      • Dialog - Change the title of Player_1 to Pleaze vote to kick...
      • Dialog - Create a dialog button for Player_1 labelled Yes kick him
      • Set VoteButton = (Last created dialog Button)
      • Dialog - Create a dialog button for Player_1 labelled No don't kick him
      • For each (Integer A) from 1 to 12, do (Dialog - Show Vote for (Player((Integer A))))
      • Wait 15.00 seconds
      • If (VoteYes Greater than or equal to 4) then do (Game - Defeat Player 1 (Red) with the message: Defeat! You were v...) else do (Game - Display to (All players) the text: The vote falied so ...)
Also, you do "voteyes + 5" when someone says "yes". I hope this is for testing purposes, since otherwise everyone can instantly kick everyone else...

Something I also hate a lot are having way too many spelling errors on a map. Making a small error now and then is ok, but something like "under stand" or "You may think that.But watch this DIE!" sounds ... wrong...
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
I understand why now... to be honest, your triggers are quite messed up, so I'm just gonna post the corrected map.

Please note that I made only 3 triggers. You no longer need to have 2 triggers per player.
Also, I made it so you can only initiate a new votekick 15 seconds after the last one. This is: to avoid votekickspams (you know, people WILL abuse this) and to avoid some serious bugs...
 

Attachments

  • Undead vs humans 2.w3x
    1.9 MB · Views: 46
Status
Not open for further replies.
Top