Warcraft III resources & community, 2003–2006 · archived
Changing the height with up/down arrow events
3 posts
Impac7
#1
Changing the height with up/down arrow events
I can see the Pilot system done by Matildaknights but there are many triggers enageg so i need the simplest way this to be done. I use a unit that morphs into air and in the air you know up arrow moves the map up, down - down etc. How do they make it the unit to change its height with up and down keys events and the map not moving? Well yes i dont use camera like many games including that pilot system was made- seeing the unit from behind and close but if it's needed ok i will do it just tell me how.
Oh and i know the action ofc: (was smth like that i havent opened the editor) Change the .. unit's height to current height + 10 using arithmetical let's say for Up and
there's an event like Player presses a button for that. if you want it to be more effective, create these triggers:
trigger 1/a event: player 1 presses the up button actions: set UpButtonPressed = true set WhichUnit = triggering player's currently selected unit (not sure this exists)
trigger 1/b event: player 1 presses the down button actions: set DownButtonPressed = true set WhichUnit = triggering player's currently selected unit (not sure this exists)
trigger 2/a event: player 1 releases the up button actions: set UpButtonPressed = false set WhichUnit = no unit
trigger 2/b event: player 1 releases the down button actions: set DownButtonPressed = false set WhichUnit = no unit
trigger 3 event: every 0.5 seconds of the game condition: UpButtonPressed = true or DownButtonIsPressed = true action if UpButtonPressed = true set WhichUnit's Fly height to (current flyheight + 5) if DownButtonIsPressed = true set WhichUnit's Fly height to (current flyheight - 5)
so you reqire 5 triggers in total... note: this is not multiinstancable!!
Impac7
#3
I tried it and nothing happened and still the map is moving.