• 🏆 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] Pls help me please

Status
Not open for further replies.
Level 12
Joined
Oct 16, 2010
Messages
680
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -kill as A substring
      • Player - Player 2 (Blue) types a chat message containing -kill as A substring
      • Player - Player 3 (Teal) types a chat message containing -kill as A substring
      • Player - Player 4 (Purple) types a chat message containing -kill as A substring
    • Conditions
    • Actions
      • Set KillLimit = (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))))
when a unit dies

increase the teams kill counter (real variable, needed for the next part)

Event
when a (real) variables value equals KillLimit

the team wins
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
By the way Lender, the string starts to detect Integer value starting from 7 not 6

Because: -kill X

As you can see, -kill is 5 and you need to put space (to make it more neater, you don't want -kill134 lol, seems a bit...)

Space is counted as letters too (therefore <space> occupies the 6th arrangement), so -kill <space><number> and number starts from 7th arrangement
 
Status
Not open for further replies.
Top