• 🏆 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!

Anyone know how to do this ?

Status
Not open for further replies.
Level 4
Joined
Jul 22, 2004
Messages
43
How u can make unit turn to right by pressing right arrow key and after u relase it, it will stop turning... like in FPS games or is it even possible?

I nearly got it working put it just only turned to specific angles.
 
Level 4
Joined
Jun 8, 2004
Messages
83
Yes its possible, just fiddle fart with the triggers im pretty sure you'll find it.
 
Level 7
Joined
Jul 30, 2004
Messages
451
Mouna said:
Yes.. i got it finally working, but i think there must be better way to do it

If someone knows good way to do it.. let me know :lol:

pretty much the only way i can think of is

event - player X presses right arrow key
actions - set bRight[player number of triggering player] = true

event - player X releases right arrow key
actions - set bRight[player number of triggering player] = false

event - every 0.5 seconds (or whatever)
actions -
for LoopA = 0 to nMaxPlayers
+ if bRight[LoopA] == true then
+ + unit - make (PlayerUnit) face (facing direction of (PlayerUnit) - 8.00) degrees over 0.00 seconds

etc... with left
 
Level 7
Joined
Jul 30, 2004
Messages
451
Nightmare_NOR said:
i got it but i cant find this trigger:
unit - make (PlayerUnit) face (facing direction of (PlayerUnit) - 8.00) degrees over 0.00 seconds

the first part is
'unit - make unit face (direction) over 0.00 seconds

in direction is
'arithmetic'

the first part of arithmetic is
unit - facing angle (or something like that)

the sign of arithmetic of course is '-'

the last part of arithmetic is 8.00 or some number
 
Status
Not open for further replies.
Top