• 🏆 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!

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

Status
Not open for further replies.
Level 19
Joined
Jan 22, 2011
Messages
3,968
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,968
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 29
Joined
Oct 24, 2012
Messages
6,543
The <string> is where purge is saying enter the string you can leave it blank.
The above will work simply change <string> to an empty string.
use the above to convert to integer then use the convert integer to real action...

Also it helps if you post what you have tried so we aren't sitting here and guessing what you did.
 
Level 19
Joined
Jan 22, 2011
Messages
3,968
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