• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Looking for this trigger

Status
Not open for further replies.
Level 7
Joined
Nov 13, 2007
Messages
244
What i want is a kill system where you can set the kill to win.For Example:

Player one types -set kills 15. If he types this you need 15 kills to win.
I also want that you can modify the kills similar to the one in anime fight.

If someone knows a sample map with this tutorial please give me the link.
+rep to anyone who helps me.
 
Level 10
Joined
Feb 8, 2008
Messages
432
Mario_64 if you give rep it will not add to somone elses until you have 10 rep yourself. Anyways heres the trigger i use for my map. Basically if somone selects 1 kill it has a custom mesage but it sets the kills to win based on whatever red types.

  • Kills Select
    • Events
      • Player - Player 1 (Red) types a chat message containing -kills as A substring
    • Conditions
      • KillsToWin Equal to 0
    • Actions
      • Set KillsToWin = (Integer((Substring((Entered chat string), 7, 20))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KillsToWin Not equal to 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KillsToWin Equal to 1
            • Then - Actions
              • Game - Display to (All players) the text: (The host has selected that you need + ((String(KillsToWin)) + kill to win! One kill... what the hell!))
            • Else - Actions
              • Game - Display to (All players) the text: (The host has selected that you need + ((String(KillsToWin)) + kills to win!))
        • Else - Actions
          • Do nothing
If you don't understand this then please go read some tutorials if you have a kill select system but dont know basic variables and gui then research on how to make maps a bit more.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Kills Select
    • Events
      • Player - Player 1 (Red) types a chat message containing -kills as A substring
    • Conditions
      • KillsToWin Equal to 0
    • Actions
      • Set KillsToWin = (Integer((Substring((Entered chat string), 7, 20))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KillsToWin Not equal to 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KillsToWin Equal to 1
            • Then - Actions
              • Game - Display to (All players) the text: (The host has selected that you need + ((String(KillsToWin)) + kill to win! One kill... what the hell!))
            • Else - Actions
              • Game - Display to (All players) the text: (The host has selected that you need + ((String(KillsToWin)) + kills to win!))
        • Else - Actions
          • Do nothing

Remove the "Do nothing". It steals memory.
Also, just for perfection's sake, make the substring check from 7 to the size of the string instead of 20.

Also, learn how to use loops.
 
Status
Not open for further replies.
Top