that's correct
Using substrings. Look at my tutorial Things a GUIer should know. The chapter on substrings will show you how.
- Untitled Trigger 002
- Events
- Player - Player 1 (Red) types a chat message containing -kills as A substring
- Conditions
- Actions
- Set tmpString = (Substring((Entered chat string), 8, (Length of (Entered chat string))))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Integer(tmpString)) Greater than 0
- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Integer(tmpString)) Greater than or equal to 30
- (Integer(tmpString)) Less than or equal to 300
- Then - Actions
- Set tmpInt = (Integer(tmpString))
- Else - Actions
- Game - Display to (All players) the text: Enter a number betw...
- Else - Actions
- Game - Display to (All players) the text: Enter numbers only.
Using substrings. Look at my tutorial Things a GUIer should know. The chapter on substrings will show you how.
The problem is in your condition trigger you use a variable and a standard above 30 kills.
To make this work you need two variables. One to store the kill amount entered in by the user. The other to store the current kills that user has gotten.
In a unit dies trigger increase the current kills integer.
In the victory trigger check if current kills is greater than or equal to kills chosen.
Also take a look at this for posting triggers. http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/
the variable you use for the player to set kills simply set it at map init to a default time. If player changes it it will update if not it will stay default.
Use a timer and have it end 15 seconds after the -kills message is displayed. Then in a timer ends trigger disable the trigger that registers the player chat message with -kills in it.
Also never use do nothing. The only thing it does is slow down triggers. It doesn't Do nothing like the action suggests. Use comments to separate things if needed.