wc3edit.net
https://forum.wc3edit.net/

Help with Substring Triggers
http://forum.wc3edit.net/broken-fulfilled-f74/help-with-substring-triggers-t821.html
Page 1 of 1

Author:  Net_Creator [ May 29th, 2007, 4:21 pm ]
Post subject:  Help with Substring Triggers

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

Author:  Xantan [ May 30th, 2007, 11:18 am ]
Post subject: 

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.

Author:  Net_Creator [ May 30th, 2007, 9:28 pm ]
Post subject:  Thanks!

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

Author:  Xantan [ May 30th, 2007, 10:45 pm ]
Post subject: 

I dont really... know whats wrong, =/

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/