Hi all, i want to make a trigger that you can create units with chat messages. So you type The unit type and how much you want that and then you get it.
How do you do that, with intiger variables?
Quite simple really basically you take a substring of the entered chat message and convert it into an integer. Tell me if you need an example. Hope that helps
when a player types a chat message, for example
"zerglings 20"
make the event "any player types (zerglings) matching: partially" (chat message event)
then the action to create zerglings, and for the number use the function string to integer, text to integer, or whatever it is, and specify "word 2 of (entered chat message)"
Don't have editor open right now, but if i wasnt clear enough say so and ill post again with the exact trigger.
Hi all, i want to make a trigger that you can create units with chat messages. So you type The unit type and how much you want that and then you get it. How do you do that, with intiger variables?
Quite simple really basically you take a substring of the entered chat message and convert it into an integer. Tell me if you need an example. Hope that helps
@DirectorOfTheUED: Go
i would like an example,
ps. sorry for the late reaction :p
when a player types a chat message, for example
"zerglings 20"
make the event "any player types (zerglings) matching: partially" (chat message event)
then the action to create zerglings, and for the number use the function string to integer, text to integer, or whatever it is, and specify "word 2 of (entered chat message)"
Don't have editor open right now, but if i wasnt clear enough say so and ill post again with the exact trigger.
@TheAlmaity: Go
i dont understand the last part with the "specify "word 2 of (entered chat message)"
and what text do i have to use in the event only the unit so only "zergling"
EDIT: it works now, thanks!