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

Pompous Intiger trigger problem

Status
Not open for further replies.
Level 9
Joined
Mar 9, 2010
Messages
272
Hi will like a good chap to help me with this really posh trigger. I want a units life to change as i type something is, for example: -set tax 234 then the life of the unit i was talking about will have its life put to 234. that the idea. Help please
 
Level 3
Joined
May 26, 2009
Messages
34
Thats it, really simple:

  • Change units life
    • Ereignisse
      • Player - Player 1 (Red) types a chat message containing -set tax as Ein Teil-String
    • Bedingungen
    • Aktionen
      • Unit - Set life of Unit to (Real((Substring((Entered chat string), 10, (Length of (Entered chat string))))))
hmpf.... german editor, sorry ;)
 
Level 3
Joined
May 26, 2009
Messages
34
  • Change units life
    • Ereignisse
      • Spieler - Spieler 1 (Rot) types a chat message containing -set tax as Ein Teil-String // HERE HAS TO BE A space after the "-set tax" so that it's "-set tax " because, otherwise the number wouldn't start with the 10th character...
    • Bedingungen
    • Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Real((Substring((Entered chat string), 10, (Length of (Entered chat string)))))) Ungleich 0.00
        • 'THEN'-Aktionen
          • Einheit - Set life of Geisterfalke (Stufe 3) 0168 <gen> to (Real((Substring((Entered chat string), 10, (Length of (Entered chat string))))))
        • 'ELSE'-Aktionen
But now you can't set unit life to 0 directly by typing "-set tex 0"
In this case, you have to write "-set tex 0.01"

hope it works now :)
 
Status
Not open for further replies.
Top