Substring(String,Integer1,Integer2)
String - is the string you wanted, whether it is an inputted command, a unit type, hero's name, etc.
Integer1 - the first character for your substring
Integer2 - the last character for your substring
*any characters between the first and last character is included in your substring
take a look at Vladadamm's example. he types a "-km" command which tells that it will set the kill max.
lets say you put "-km 100". the trigger with the
-
Player - Player 1 (Red) types a chat message containing -km as A substring
starts, since the player entered a chat message containing a "-km" in it. then the action
-
Set KM_Limit = (Integer((Substring((Entered chat string), 5, (Length of (Entered chat string))))))
will set the KM_Limit to 100. for the
Substring((Entered chat string), 5, (Length of (Entered chat string))), it commands the computer to take the substring from the
Entered chat string, which is "-km 100". the 5 states that the first character of the substring is the 5th character on your string, which is 1
1234567
-km 100
lastly, the
(Length of (Entered chat string)) states that the last character for the substring is the length of entered chat, so if you input "-km 100", the length will be 7 character, so it will be 0
1234567
-km 100
therefore, the substring will be "100", which you will need to convert to an integer and set it to KM_Limit. the two integer values
for you, since the one you wanted to type is "-set kills xxx", the first integer should be 11.