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

Part of ImpaleTargetDust.mdl not scaling

Status
Not open for further replies.
Level 39
Joined
Feb 27, 2007
Messages
5,013
ImpaleTargetDust.mdl is made up of two 'floofs' of dust separated by a brief delay. When scaling this model with BlzSetSpecialEffectScale() the first floof scales properly, but the second one does not scale at all! I found the same behavior when giving a unit this model and scaling the unit in the OE or with SetUnitScale(). Is this some sort of problem with particles I'm unaware of? It seems very weird that only part of this doesn't scale....

A short demo is below. Press Esc to spawn a 10% scale version of the effect, watch for both floofs, then see a 500% scale version of the effect with the same second floof.
JASS:
library ImpaleBug initializer init
  private function foo takes nothing returns nothing
    local effect e = AddSpecialEffect("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl", 0., 0.)
    call BlzSetSpecialEffectScale(e, 0.1)
    //call DestroyEffect(e)

    call TriggerSleepAction(3.)
    set e = AddSpecialEffect("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl", 0., 0.)
    call BlzSetSpecialEffectScale(e, 5.)
    //call DestroyEffect(e)
  endfunction

  private function init takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterPlayerEvent(t, Player(0), EVENT_PLAYER_END_CINEMATIC)
    call TriggerAddAction(t, function foo)
  endfunction
endlibrary
 
Level 14
Joined
Apr 30, 2018
Messages
351
Well, the 2nd dust is spawned via an event object, not a particle emitter like the first one, and that is why it doesn't scale (as far as I know event objects don't scale with the model)


I don't understand why this effect is made that way though, it seems like the 2nd dust looks exactly the same as the first one, so if you want both dusts to scale properly, here is a version that you can replace the default one with, the difference is that it uses the 2nd dust as a particle emitter instead of an event object, so it scales properly (I tested it ingame).
 

Attachments

  • ImpaleTargetDust2.mdx
    1.5 KB · Views: 22
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
5,013
Are there other default wc3 models people are aware of that use event objects? This is nice and will work--I was just hoping to find a way to use the default impaledust model without having to overwrite it with an import. Thanks!
 
Level 14
Joined
Apr 30, 2018
Messages
351
Are there other default wc3 models people are aware of that use event objects?
Actually most default (and custom) models use event objects, they are necessary for making:

-Sounds (e.g death or attack sounds)
-Blood appearing on death
-Footprints
-Ubersplats (e.g the crater made when the mortar shell explodes)

But the problem with this model, is that it uses an event object in a really useless way, it essentially spawns itself again, where it just could be done with the same particle emitter (which I did in my version I attached above)

I am not aware of any other default model that uses an event object in an odd way like this.
 
Last edited:
Status
Not open for further replies.
Top