I want when I type \altitude(number) the flying height of the currently selected units to change gradually to whatever number I typed. It should not happen when I type in a chat command anything with numbers, only when i type \altitude(numbers) so how do I do that? I hava a trouble figuring out the substrings thing.
The reason why I use a """ blank in the event is I use this trigger for other chat commands as well thats why I start the specific Chat commands with If Chat Command === "something"/Then/Else actions.
Quote:
StarCraft II Trigger - Altitude
Events
Game - Player 1 types a chat message containing "", matching Exactly
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Substring((Entered chat string), 1, 9)) == "\altitude"
Then
Unit Group - Pick each unit in (Selected units for player 1) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
((Picked unit) is Required: Air; Excluded: Missile, Dead, Hidden for player 1) == true
Then
Unit - Change (Picked unit) height to (Real((Substring((Entered chat string), 10, 15)))) over 60.0 seconds
Else
Else
Quote:
Warcraft III Trigger - Altitude
Events
Player - Player 7 (Green) types a chat message containing /altitude as A substring
Conditions
Actions
Unit Group - Pick every unit in (Units currently selected by Player 7 (Green)) and do (If (((Picked unit) is A flying unit) Equal to True) then do (Animation - Change (Picked unit) flying height to (Real((Substring((Entered chat string), 11, (Length of (Entered chat string)))))) at 100.00) else do (Do nothing))
The bad about the SC2 trigger, which is very lame, instead of choosing at X Rate to change height like war3, it chooses Time to reach height. If I used a formula to make the time proportional to the distances it passes, so it elevates up or down slowly based on the distance to travel, if it had land and the proportion became 0 or negative. it would instantly go down which would be unrealistic as it uses Time instead of Rate...
I want when I type \altitude(number) the flying height of the currently selected units to change gradually to whatever number I typed. It should not happen when I type in a chat command anything with numbers, only when i type \altitude(numbers) so how do I do that? I hava a trouble figuring out the substrings thing.
The reason why I use a """ blank in the event is I use this trigger for other chat commands as well thats why I start the specific Chat commands with If Chat Command === "something"/Then/Else actions.
The bad about the SC2 trigger, which is very lame, instead of choosing at X Rate to change height like war3, it chooses Time to reach height. If I used a formula to make the time proportional to the distances it passes, so it elevates up or down slowly based on the distance to travel, if it had land and the proportion became 0 or negative. it would instantly go down which would be unrealistic as it uses Time instead of Rate...