| 04-09-2003, 01:49 AM | #1 |
Help me out here. I'm very new to triggering, and I'm not sure how to accomplish this. I want, in a map of mine, a player to be able to type "rotate 255", and have any units currently selected by that player instantly face 255 degrees. (The 255 doesn't matter, I want the player to choose the number) How do I do this? Thanks a lot. |
| 04-09-2003, 02:49 AM | #2 |
Not sure of the exact triggers as I don't have my editor open in front of me, but you need to do something like: event: player enters chat message with substring "rotate" //Not sure exact trigger for this whether you need to specify the substring is from 0-5 or not. Check the trigger and see action: String_variable = chat message(substring,6,length of chat) (As I said I dont have the editor so I'm just giving basics, you will need to check the trigger to find out what you need to do) integer_variable = convert string to integer(string_variable) unit group pick all units in entire map and make picked unit face (current unit facing direction + integer_variable). Sorry I can't be more specific, I'm at work at the moment and so can't open the editor, but these should give you the basic ideas on how to create the trigger. If you are still stuck post again and I will make a more detailed tutorial. Hope this helps, SheepOfDoom |
