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

Unit won't render when model is special effect

Status
Not open for further replies.
Level 14
Joined
Aug 30, 2004
Messages
909
I'm working on a custom spell. When the hero casts it, I generate about 10 units near the target point and each of those units casts a cluster rocket ability at the target point. Everything works fine with one exception:

the dummy unit that casts the cluster rocket ability won't render. I put as the unit-type's model the Impale special effect so it looks like dust being kicked up from the ground. This never shows up though.

I investigated. When I change the dummy unit from the Impale model to a unit model (like an Abomination), it renders fine. The Abom shows up, casts his ability, and then dies a few seconds later (the dummy unit has negative health regeneration). But when I change the model to a special effect of some kind, it just never appears and the rockets shoot out nothing.

I'm completely out of ideas. Does anyone know why a special effect wouldn't render? (Incidentally, if I manually place the unit in the editor, I can see it rendering while the editor is open).
 
Level 14
Joined
Aug 30, 2004
Messages
909
Personally, i always was able to use a SFX as model, even the ones with just one animation

How about you create a modelless unit and create the SFX in triggs?

I've definitely used special effects as models before as well. I find this so baffling.

I think I can make the special effect manually, but I can't destroy it right away to prevent leaks. If I destroy the special effect it won't keep creating dust particles; so I'll have to wait and destroy it. That means making an array of special effects I suppose. I could do it if I have to I guess.
 
Level 11
Joined
Jun 2, 2004
Messages
849
Simple trigger to destroy effects after a set amount of time:
  • SE Cleanup
    • Events
    • Conditions
    • Actions
      • Custom script: local effect LocalEffect = bj_lastCreatedEffect
      • Wait 2.00 game-time seconds
      • Custom script: call DestroyEffect(LocalEffect)
Call with Trigger - Run Trigger (ignoring conditions). The wait action will not delay the main trigger.


With some jass you can make it a function instead, which would make it easier to wait different amounts of time (instead of having to make a separate trigger for different wait times).
 
Level 11
Joined
Jun 2, 2004
Messages
849
Probably not a big deal unless you're spamming special effects (possible, being special effects after all).

There's the other wait. Inaccurate, especially if there's lag, but a minor graphical glitch isn't a big deal either.

Timers and hashtables available for fancy magic that's accurate and no leaks.
 
Level 11
Joined
Jan 25, 2017
Messages
213
I had this issue before. Many of the special effects models only have a birth and/or death animation and so they won't show up normally (unless you specify it in triggers: ie. play last created unit's birth animation).

As an alternative I suppose you can edit the model itself to rename or give it a stand animation, sfx models are generally low on file size.
 
Status
Not open for further replies.
Top