Page 1 of 1

Help with Substring Triggers

Posted: May 29th, 2007, 4:21 pm
by Net_Creator
Okay, I'm working on a map. Technically, an arena. I want to be able to change the spawn rate ingame from 5 to 30. I did this a hard way, but it was still messed up, because as I typed sentences with "spawn" in them, my trigger gave me back my error message I put in. Can someone write up a code including substrings so player 1 (red) can type in "spawn #" being from 5 to 30 for me? Thank you, very much!

- Net_Creator
Vuen's Substring-annoyed Dungeons and Dragons Administrator

Posted: May 30th, 2007, 11:18 am
by Xantan
I am not really sure what you're asking... if you could go into more in-depth detail on what we are spawning, where, why.. and uh. yeah :p

Edit: ok I reread it. lol.

events - player types -spawn as a substring

actions spawn (number = substring > entered chat string > 7,10) should work fine.

Thanks!

Posted: May 30th, 2007, 9:28 pm
by Net_Creator
Thank you a lot. Here, I copied my action. Take a look. :)

If ((Substring((Entered chat string), 1, 8 )) Equal to setspawn) then do (Set x = (Real((Substring((Entered chat string), 10, 13))))) else do (Game - Display to (All players) the text: |CFFCC0000Oops! Sor...)

Posted: May 30th, 2007, 10:45 pm
by Xantan
I dont really... know whats wrong, =/