• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] boot player system

Status
Not open for further replies.
Level 10
Joined
Sep 29, 2006
Messages
447
okay so im trying to make a system in my map that boots team killers. basically if you kill an allied hero 3 times, the player you killed gets the option to boot you (through dialogue boxes) right now i have no way to test it so i was wondering if someone could take a look at my triggers and tell me if you see any bugs or mistakes and such. here they are

  • boot player integer
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Killing unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True
    • Actions
      • Set BootPlayer[(Player number of (Owner of (Killing unit)))] = (BootPlayer[(Player number of (Owner of (Killing unit)))] + 1)
  • boot player show
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Killing unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BootPlayer[(Player number of (Owner of (Killing unit)))] Greater than or equal to 3
        • Then - Actions
          • Set BootedPlayer = (Owner of (Killing unit))
          • Dialog - Clear boot_dialog
          • Dialog - Change the title of boot_dialog to (cc_player[(Player number of (Owner of (Attacking unit)))] + (end_tag + has killed you |nBoot Player?))
          • Dialog - Create a dialog button for boot_dialog labelled Yes
          • Set dialog_button[1] = (Last created dialog Button)
          • Dialog - Create a dialog button for boot_dialog labelled No
          • Set dialog_button[2] = (Last created dialog Button)
          • Dialog - Show boot_dialog for (Owner of (Triggering unit))
        • Else - Actions
  • boot player
    • Events
      • Dialog - A dialog button is clicked for boot_dialog
    • Conditions
      • (Clicked dialog button) Equal to dialog_button[1]
    • Actions
      • Game - Defeat BootedPlayer with the message: You have been boote...
  • no boot player
    • Events
      • Dialog - A dialog button is clicked for boot_dialog
    • Conditions
      • (Clicked dialog button) Equal to dialog_button[2]
    • Actions
      • Player Group - Pick every player in (All Players) and do (Actions)
        • Loop - Actions
          • Dialog - Hide boot_dialog for (Picked player)
 
Last edited:
Level 14
Joined
Jan 15, 2007
Messages
349
The function GetPlayersAll() dont create a force it just returns bj_FORCE_ALL_PLAYERS. So it would destroy bj_FORCE_ALL_PLAYERS. That means next time it returns a destroyed bj_FORCE_ALL_PLAYERS. There is the proof:
JASS:
function GetPlayersAll takes nothing returns force
    return bj_FORCE_ALL_PLAYERS
endfunction
 
Level 14
Joined
Jan 15, 2007
Messages
349
Ok I try to explain it better he also could write:
  • Custom script: set AllPlayers = bj_FORCE_ALL_PLAYERS
Now when he destroy it he also could write:
  • Custom script: call DestroyForce(bj_FORCE_ALL_PLAYERS)
Its exactly the same. But how you can return something that is destroyed? I hope now you understand.
 
Level 10
Joined
Sep 29, 2006
Messages
447
well this is an AoS so you should be able to kill your own ally right before an enemy does to prevent them from getting gold. thats just strategy in my opinion. then, if you tell your teammate why you did it, you wont get booted. also i need team killing for denying towers and such. but if a player attacks their fortress (the win condition building) they are first warned, then killed, if they do it again, theyre automatically booted. thats my anti team kill system
 
Status
Not open for further replies.
Top