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

[Spell] Chat string amount of letters to a number?

Status
Not open for further replies.
Level 19
Joined
Jan 22, 2011
Messages
3,979
LOL sorry found it now, frigging war3 in german. thx :3
...This is awkard, but is there any way to use this with any entered chat string and not just an especific one? (I want to use something like the last entered chat made by any one)
 
Last edited:
LOL sorry found it now, frigging war3 in german. thx :3
...This is awkard, but is there any way to use this with any entered chat string and not just an especific one? (I want to use something like the last entered chat made by any one)

Just register the event for the all the players you want to. e.g:
  • Chat Trigger
    • Events
      • Player - Player 1 (Red) types a chat message containing <String> as A substring
      • Player - Player 2 (Blue) types a chat message containing <String> as A substring
      • Player - Player 3 (Teal) types a chat message containing <String> as A substring
      • ... etc ...
    • Conditions
    • Actions
      • Set Integer = (Length of (Entered chat string))
Modify the events as a needed. ... etc ... means that you would register it for all players for that map. You can alternatively use a loop to add the events to the trigger (you would add them from a trigger that runs on map initialization), but I was just showing the trigger above as an example.

I might've misunderstood your question though.
 
Level 19
Joined
Jan 22, 2011
Messages
3,979
No no thats yust what I need. It still doens't seem to work at all. I enter a chat, and I have a spell that deal damage equal to amount of letters entered in last chat, I don't get the<string> thing, is that supposed to be a fuction? Or Will I be forced to make an event for each possible string (o_O)
Or is it impossible to convert any entered chat to an integer and them to a real?
 
Last edited:
Level 19
Joined
Jan 22, 2011
Messages
3,979
It's supposed to be a sistem to make damage based on the amount of letters last chat message had, so LOL xD
EDIT:
Now anything makes sense and work :D I hope you like when my map comes out, and you will get mad when you write the maximal amount of characters (1023 was it?) and somebdy just spams 1 letter, 1 damage :D
 
Status
Not open for further replies.
Top