• 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 Help, dealing with chat strings

Status
Not open for further replies.
Level 3
Joined
Jun 10, 2005
Messages
12
Im trying to create a trigger that will take the players chat string's and get the number entered after a substring.

Example:

-spawn 15

How can i get the trigger to get the number (15) that the player enters.

I started with "a player types a chat message containing "-spawn" as a substring" but after that i have no idea where to go, i looked threw most integer events and didnt find anything that looked to be what i was looking for, any help is greatly appreciated, thanks in advance :D
 
Level 3
Joined
Jun 10, 2005
Messages
12
I got it , found a nice tutorial that explained everything here:
http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=28094

Substring, #, #
Subgstring = entered chat string, # of first character, # of last character.

For instance

player types "-spawn" as a substring

create {substring[entered chat string, 8,9] footman for player at location.

-spawn is 6 letters, to the sixth place, 7 for a space, 8 and 9 are for the ## u want to spawn.

-spawn 20
would now spawn 20 footman

hope i helped anyone who had the same question and thanks for help anyone gave me.
 
Status
Not open for further replies.
Top