| 06-15-2008, 09:25 AM | #1 |
I'm working on a map right now in which Player 1 can set the score limit. I have a real variable called "Victory" and when a team reaches that number they win. Player 1 has 10 seconds in the beginning of the game to type in a number (between 1 and 100 or whatever) and then this will be set as "udg_Victory". But I'm not sure how to go about doing this because Player 1 may type in something other than numbers during that time or he may type in a number too large. If he types in nothing, that's okay because the variable is set to 50 by default. Any help will be appreciated. EDIT: Sorry I meant to post this in Scripting :/ |
| 06-15-2008, 10:08 AM | #2 |
Hmm, similar problem was discussed here - http://wc3campaigns.net/showthread.php?t=100216 Just add check for ranges of variable: Trigger: VictorySetting
![]() Conditions
![]() Actions
![]() ![]() Set tempstr = (Substring((Entered chat string), 5, (Length of (Entered chat string))))
![]() ![]() For each (Integer A) from 1 to (Length of tempstr), do (Actions)
![]() ![]() Trigger - Turn off (This trigger) |
| 06-15-2008, 06:36 PM | #3 |
Thank you very much. That works out perfectly. (+rep) |
