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

Spinning Fire Lord

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,601
Hey.

I'm making a spell where Fire Lord starts to spin around(just for the player 1). When player casts the ability Fire Lord to spins slowly, but the spinning becomes faster and faster until it's like crazy.

The coding didn't go as I foreseen. So I need your help, can you help me to finish this? It now doesn't seem to get that fast I wanted and it starts to spin opposite direction after a while.

Maybe I'm just doing this wrong way? Rep + credits for the helper.
 

Attachments

  • Spinning Fire Lord.w3x
    16.7 KB · Views: 69
Level 19
Joined
Feb 4, 2009
Messages
1,313
there is a cap for rotation
it is set in the object editor next and called "Movement - Turn Rate"
and turn rate is capped again to 3
of course you can modify this to be bigger with shift-click but it won't have any effect
you can either remove the last firelord and replace it with a firelord rotated by a few degrees
or use cyclone with a custom rotation model
or use a dummy, attach a firelord effect to it and rotate the dummy with this:
http://www.wc3c.net/showthread.php?t=105830
or extract the firelord from the mpq, make a custom animation where he is spinning, import the modified firelod and play his animation
all these methods suck but I couldn't find any better solution yet
 
Level 37
Joined
Aug 14, 2006
Messages
7,601
This is all I can do

Did you even test that? It doesn't work at all!

there is a cap for rotation
it is set in the object editor next and called "Movement - Turn Rate"
and turn rate is capped again to 3
of course you can modify this to be bigger with shift-click but it won't have any effect
you can either remove the last firelord and replace it with a firelord rotated by a few degrees
or use cyclone with a custom rotation model
or use a dummy, attach a firelord effect to it and rotate the dummy with this:
http://www.wc3c.net/showthread.php?t=105830
or extract the firelord from the mpq, make a custom animation where he is spinning, import the modified firelod and play his animation
all these methods suck but I couldn't find any better solution yet

Or it could be made with triggers easily if you just know how, I think. And I don't know how to do it properly. That is why I came here.

To make a spinning model animation would take too much time. Does anyone know how to do this with triggers?

I just need a trigger that unit starts to spin faster and faster. After 5 second has passed, it continues to spin with that specific speed as long as it is deactivated.
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
Functions like
  • Unit - Make (Triggering unit) face Default building facing over 0.00 seconds
Are ordering the unit so it's not effective.
The easiest way to achieve what you want would be to recreate the unit in loop,highly inefficient,but if it's a boss or something you encounter once in game,then it's ok.
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
click on the link in my first post :p
and you can even do this with GUI to some extend
it's called "Animation - Lock Body Part Facing"
but as I said
it's no perfect solution

I'm still looking for a better one but I doubt that there is one since noone found it yet
edit:
someone could make a model with lots of stand animations each rotated by a bit and play the animation by sequence
this would circumvent the first frame flickering but it would also take a few kb of filesize
but since I don't know a bit about quaternion rotation I can't help you
maybe your best shot is to create a lot of firelords and replace them for every angle
edit:
for some weird reason even that flickers
a simple trigger like this works best for now
  • Spinning Firelord
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set speed = ((speed + 0.10) mod 40.00)
      • Set angle = (angle + speed)
      • Unit - Remove firelord from the game
      • Set loc = (Point(0.00, 0.00))
      • Unit - Create 1 Firelord for Player 1 (Red) at loc facing angle degrees
      • Custom script: call RemoveLocation(udg_loc)
      • Set firelord = (Last created unit)
      • Animation - Change firelord's animation speed to 0.00% of its original speed
this will create lots of units and every created unit leaks but as long as you don't use this 20 times for 30 minutes it might work fine
 

Attachments

  • Spinning Firelord.w3x
    12.1 KB · Views: 59
Last edited:
someone could make a model with lots of stand animations each rotated by a bit and play the animation by sequence
this would circumvent the first frame flickering but it would also take a few kb of filesize
but since I don't know a bit about quaternion rotation I can't help you
maybe your best shot is to create a lot of firelords and replace them for every angle
edit:
for some weird reason even that flickers

Or someone could save time and just use a bladestorm animation and adjust the animation speed with triggers.
 
Level 37
Joined
Aug 14, 2006
Messages
7,601
This is harder than I would ever think.

D4RK_G4ND4LF: I really don't have patient to read anything too complex for me. I also use frequently that lock body part thing and it doesn't work as I want in this case... Also it would be a bit gay to have like 360 fire lords for every degree. :D
Kita: But it's Fire Lord? That model doesn't have bladestorm animation.

Maybe the best solution is to create a spinning animation for Fire Lord and change the animation speed with triggers. I didn't know this was so hard. :<
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
Or someone could save time and just use a bladestorm animation and adjust the animation speed with triggers.

the bladestorm animation is just a single animation
you can't say "hey! look towards that angle!"
it will spin constantly
I thought that would be a problem because you could not set the rotation speed in this case but I forgot about "Animation - Change Unit Animation Speed"
So I made a dummy with 1 attachment point (origin) which spins around itself one a second
If someone wants to spin it faster this person can adjust the animation speed with triggers
It even works with cyclone ability so one does not have to save every unit model for a spell
Actually I posted exactly this in a thread with a very similar name some time ago
I just forgot about it :vw_death:
I bet I could have found it with the search tool very fast

Attached is the dummy and a testmap with 2 examples on how to use it
You can easily adjust the rotation speed with magos model editor (war3modeleditor in the tool section) as well
 

Attachments

  • Spinning Firelord.w3x
    13.2 KB · Views: 43
  • D4RKsSpinDummy.mdx
    1.2 KB · Views: 86
Level 37
Joined
Aug 14, 2006
Messages
7,601
Thanks guys for helping me. Especial thanks to D4RK_G4ND4LF who really put some effort helping me. However, Kita made a new Fire Lord animation when it's spinning. Also he put some extra things to it.

I see this as the best solution for this matter. I'll give rep for everyone, but special thanks to D4RK_G4ND4LF.
 
Status
Not open for further replies.
Top