Is there a way to change the direction of special effects attatched to a unit?

Level 9
Joined
Mar 17, 2016
Messages
133
I've been trying to add custom triggers to a basic spell just to change up the look to it, however I'm not having any luck with one particular thing- the angle, or direction, of the spawned special effect.


I'm trying to use the Special Effect - Change Pitch/Yaw/Roll functions but no matter what I try it doesn't want to change the direction.

It may be worth noting that I am using a model from the "Spawned Effects" menu, not sure if that would cause the issue but I wouldnt be surprised if that was the problem.

Anyways, Is there a known way of doing this? Am I doing something wrong? This is the trigger I'm trying to use currently that will spawn the flame from the unit's hand, but at a 90 degree angle (and it doesn't change if I alter the value of the roll from 0.00 to 90.00, nor if I change it to Yaw/Pitch).

  • MF Flame of Dusk Copy
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Flame of Dusk (MF)
    • Actions
      • Set VariableSet UnitPlayerCaster[0] = (Triggering unit)
      • Wait 0.77 seconds
      • Special Effect - Create a special effect attached to the hand of UnitPlayerCaster[0] using Objects\Spawnmodels\Other\FlameThrower\FlameThrowerSpawnObj.mdl
      • Set VariableSet SpecialEffectAbil[2] = (Last created special effect)
      • Special Effect - Set Scale of SpecialEffectAbil[2] to 2.00
      • Special Effect - Set Roll of SpecialEffectAbil[2] to: 0.00
      • Wait 1.50 seconds
      • Special Effect - Destroy SpecialEffectAbil[2]
 
Level 10
Joined
Dec 11, 2009
Messages
234
I did some tests in 1.31.1 and effect rotation functions don't work, if effect is attached to unit.
I guess this is because the game updates (on every rendered frame) those values internally.
And BTW, these are designed for radians, not degrees.
 
Last edited:
Level 9
Joined
Mar 17, 2016
Messages
133
I actually even searched and found a custom script command that would change the value of a variable (That was being used as the angle) to radians, it was:
  • Custom script: set udg_Angle = 270. * bj_DEGTORAD
and that still didn't work. I could've very well just done something wrong as I don't completely understand what's going on beneath, but maybe it's just a world editor limitation.
 
Level 19
Joined
Aug 13, 2013
Messages
1,679
Have you tried using another model? What editor version do you have?

EDIT:

Tested those functions on 1.30.4,
yaw and pitch works although the roll doesn't.
(Also yaw is behaving like roll which is strange)
None of them works when attached to a unit.

You can have 3 workarounds here;

*Hard but works enough;
This one is complex by creating a special effect and manipulate its height equal to the hand of the unit and its facing offset then rotate using trigger editor. It may look unnatural since units do certain kinds of animations to move the attachment point of the hand so the effect must follow this movement as optional.
(I think you're not gonna try this as it almost sounds beyond for you to do yet)

*Medium if you're familiar on model editing;
This one is simple by tweaking the rotation of the model itself through magos editor.
(Requires basic knowledge using the tool)

*Easy if you're patient and lucky;
Model editing request
 
Last edited:
Level 9
Joined
Mar 17, 2016
Messages
133
Thank you to everyone who responded. :) I think I'll try my luck with rotating the model as I'm sure that can't be too hard, just a matter of finding where the model itself is stored within the WC3 files and using some editor.

Cheers!
 
Thank you to everyone who responded. :) I think I'll try my luck with rotating the model as I'm sure that can't be too hard, just a matter of finding where the model itself is stored within the WC3 files and using some editor.

Cheers!
What model are you talking about? I can rotate it for you.
 
Level 9
Joined
Mar 17, 2016
Messages
133
What model are you talking about? I can rotate it for you.
Wow! Thank you <3 I'm using "Objects\Spawnmodels\Other\FlameThrower\FlameThrowerSpawnObj.mdl" (Flamethrower) in the 'Spawned Effects' category. This is the angle that it's currently coming out at if it helps.

Untitled.jpg
 
Last edited:
Top