Can you move a Special Effect?

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,658
Uhm... nope.

However you can make a dummy unit and attach a special effect to that unit.
Then you can use SetUnitX() and SetUnitY() to set it's location.
This is how missile systems work... regulary.

(You were not looking for something "like" SetUnitX(). You were looking for SetUnitX() itself.)
 
Level 14
Joined
Aug 30, 2004
Messages
909
Thanks Wietlol. You got me thinking with this...

I have a missile system that uses units with locust and the model of the missile itself. Is there some reason to use an invisible unit and attach the model as a special effect?
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
Yea should have attached the model for the dummy though.
If you don't have a model on the dummy, the dummy does not display anything at all.

The reason is this:
set udg_CMS_Param_Missile_Model = "Abilities\\Weapons\\Arrow\\ArrowMissile.mdl"

You don't need a new unit for each different missie model.
You just define the model of the missile and attach it to the dummy unit's origin.
 

Attachments

  • DUMMY.mdx
    2 KB · Views: 61
But you can't set the animation speed of a special effect either... or am I missing some natives?

Or do I understand it wrong and are you replying on the missile system with dummy or missile units rather than the discussion of special effects and units?

You can change the animation speed of a unit with the model. You can't change the animation speed of an empty model with the effect/model attached.
 
Level 14
Joined
Aug 30, 2004
Messages
909
All very interesting, thanks guys. I've always used a new unit for every type of missile (e.g. in my Battle for Tatooine map). I suppose I could have cut down on some of the clutter if I had just used a single dummy unit.
 
@Wietlol

It will just change the speed of how dummy.mdx will change it's roll (or yaw, whatever you call it) speed. dummy.mdx has 360 animations fyi

@darwin

Just like Wietlol suggested, use dummy.mdx. Attach a special effect to it (esp. chest attachment) and let it do the job. Make sure to destroy the effect before you remove the unit to prevent memory leaks.
 
@Wietlol

It will just change the speed of how dummy.mdx will change it's roll (or yaw, whatever you call it) speed. dummy.mdx has 360 animations fyi

@darwin

Just like Wietlol suggested, use dummy.mdx. Attach a special effect to it (esp. chest attachment) and let it do the job. Make sure to destroy the effect before you remove the unit to prevent memory leaks.

It only has 180 animations actually.
 
Level 14
Joined
Aug 30, 2004
Messages
909
I don't really care how much animations a model got :D not a dummy model at least.
I can change its angle yaw and arc so... enough for me.

I downloaded the dummy model you linked, opened it in the model editor and I didn't see any animations that allow me to change angle, yaw and arc. Am I missing something? I'd love to be able to angle missiles! Right now I have 5 ballista missiles with different angles and I swap them in and out as the missile flies.
 
Level 14
Joined
Aug 30, 2004
Messages
909
SetUnitFacing() ?

I don't mean the facing, I mean things like pitch. So when an archer shoots an arrow, it angles upward, then levels out and then angles down when it's about to hit the ground. I would like to do that in a custom projectile system. The only way I could think to do it was modifying the .mdx model and saving 5 different versions of the same unit. So when it fires, I use the "facing up" unit...swap it out after a while and so forth. It looks okay, but isn't smooth.

I'd love to have a command that lets me control the unit's pitch so I can tilt it upward. Does this exist using some kind of dummy unit?
 
I don't mean the facing, I mean things like pitch. So when an archer shoots an arrow, it angles upward, then levels out and then angles down when it's about to hit the ground. I would like to do that in a custom projectile system. The only way I could think to do it was modifying the .mdx model and saving 5 different versions of the same unit. So when it fires, I use the "facing up" unit...swap it out after a while and so forth. It looks okay, but isn't smooth.

I'd love to have a command that lets me control the unit's pitch so I can tilt it upward. Does this exist using some kind of dummy unit?

If it is Vexorian's dummy model, it will allow you to tilt it's body into a 3D angle
 
Status
Not open for further replies.
Top