• 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] Multi-Number Effects help

Status
Not open for further replies.
Level 9
Joined
Mar 24, 2011
Messages
353
Do you remember the cheat "greedisgood X"
greedisgood = cheat base
X = number of Gold and Lumber at you gains
OK?

So I needed to do a trigger basically not "equal" but with the same "purpose" means?

In other words, how do one trigger that I write something on the front and a sum of numbers in the chat space after the game that, depending on which number I win or I will reduce that amount?

(in my case the amount will trigger manipulate life and mana of the selected units)

Thanks :D
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
  • Chat Command Add Gold
    • Events
      • Player - Player 1 (Red) types a chat message containing midashand as A substring
    • Conditions
    • Actions
      • Set numberLocation = 11
      • Player - Add (Integer((Substring((Entered chat string), numberLocation, (Length of (Entered chat string)))))) to Player 1 (Red) Current gold
numberLocation is an integer an is set to 11 based on the chat comand

midashand(space)#Till the end
1234567891011Length of the chat string
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
Starquizer, but in my case the amount will trigger manipulate life and mana of the selected units, not gold or lumber :/

The example I gave you is just an example to show you how to get the number from the chat command, all that is left now is that you use this number to your needs.

Remember that we actually get a string from the chat so you need to convert it to integer or real according to what you want the command to do.
 
Status
Not open for further replies.
Top