• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Sliding?

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2007
Messages
195
Just use simple GUI triggers?

####################

Global - boolean - IsKeyDown = false <default>
Global - unit - U = yourHero01 <default>

####################
Events
- When Player presses W down.
Local Variables
- Local - point - P = noPoint
Conditions
-
Actions
- set IsKeyDownW = true
- while
- conditions
- - IsKeyDownW = true
- actions
- - set P = ((Position of unit) towards (facing of U))
- - if (IsPathable(P, PATHING_GROUND) == false) then
- - - set IsKeyDownW = false
- - else
- - - move U to P
- - endif
- endwhile
####################

####################
Events
- When Player presses W up.
Local Variables
-
Conditions
-
Actions
- set IsKeyDownW = false
####################

Well, you get the point.
 
Status
Not open for further replies.
Top