• 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] 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