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

Special effects or units with locust?

Status
Not open for further replies.
Level 12
Joined
May 22, 2015
Messages
1,051
It seems that the special effects triggers are pretty limited. I assume it is faster to use them, in general. Is that the case? Otherwise they're only handy for attaching to units and stuff.

With units, I can resize them, change their colour, their transparency, move them around, play specific animations... As an example, I have 3 spells that have modified thunderclap models for their special effect. I can replace those 3 with one dummy with locust with the regular thunderclap attributes (size = 1.00, all colours are at 255) and then resize and recolour it how I want in the trigger that creates it. None of those can use the special effect version for the animation because of the size and colour. Since I need the thunderclap model on a unit, I can also use that in place of special effects for when I want the regular thunderclap animation.

TL;DR
Should I bother using special effects when I can just use dummies with locust? Are there performance benefits to using special effects as opposed to units?
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
It is a common way to use units instead of effects.Only time you want to create a effect model instead of changing a unit is, when you use that same effect too much.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Thanks. I wasn't sure if it was bad to be spamming all these dummy units everywhere. I guess there aren't a ton of the effects happening, but they're pretty frequent - especially for certain heroes.
 
Units take up a lot more memory than special effects, and CreateUnit() is slower than AddSpecialEffect() if I recall correctly. But once the unit is made, it has about the same graphics load as an effect would.

However, because units take up a lot more memory, it is worthwhile to consider some form of dummy recycling.

But most maps will do just fine even without dummy recycling. IMO, put dummy recycling on the backburner unless you have spells that create over 20 units each. You can always implement it later. Anyway, if you are just using the dummy model with the effect attached, then you can always just implement a system like Bribe's MissileRecycler:
http://www.hiveworkshop.com/forums/jass-resources-412/system-missilerecycler-206086/

If you are using dedicated unit objects for each effect, then you'll probably have to implement recycling on a spell-by-spell basis.
 
Status
Not open for further replies.
Top