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

Rotating unit around its Z axis using triggers

Status
Not open for further replies.
Level 14
Joined
Jul 1, 2008
Messages
1,314
i never saw a function, which could do this.

But there is a work around. You just have to create a few units of the same type with different negative angles, and replace them by triggers.
This could be very difficult in a dynamic situation, but for example for some drunken dudes, its very nice :)

Greets
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
You could use a dummy model and attach your unit via special effects to the dummy model and then change the pitch of the unit by changing the current animation the dummy is playing. The only bad thing I can see about this is that your original unit will only play stand animation.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Lol.

It has 180 animations, use SetUnitAnimationByIndex. 90 = straight forward. 0 = straight up? or down, can't remember. 180 = the opposite of 0.

You can attach a model(as a special effect) to a dummy that uses the dummy.mdx model and than set the dummy unit animation (by index) to 0:180. Thus rotating it.
 
Level 5
Joined
Sep 13, 2007
Messages
33

Pardon me for not seeing the second page. Meh, this is exactly the kind of attitude that differs a helpful member from a rep addict. Just to be noted...



You can attach a model(as a special effect) to a dummy that uses the dummy.mdx model and than set the dummy unit animation (by index) to 0:180. Thus rotating it.

Thanks.

Edit: Well, another fail for me, I'm not sure where it is located. I searched here and at WC3C
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Yeah, it is kinda hard to find :D
I found mine in the SSE demo map in this site.
This is it.

And no problem, I was just surprised ;)
 
Level 5
Joined
Sep 13, 2007
Messages
33
Yet again I'm facing another problem. :p

JASS:
call AddSpecialEffectTarget("units\\human\\GryphonRider\\GryphonRider.mdl", Hero, "chest")

Didn't work, the unit is invisible. Perhaps I imported the file not correctly? Its current path is war3mapImported\dummy.mdx.

Thanks. :)

P.S. Change it to Unsolved?
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Origin
Also things to note are that to make an effect move with the unit it is attached to you have to use setunitposition and not (setunitx and setunity).
 
Status
Not open for further replies.
Top