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

Locust vs hide unit

Status
Not open for further replies.
Level 4
Joined
Jan 5, 2014
Messages
79
Why is everywhere written to give dummy unit no model, no shadow, locust ability and so on, when it is enough to hide it via tigger (at least it seems so to me)? Moreover, u can even give orders to the hidden unit via triggers, which u cannot to unit with locust.

I am asking coz i think all the poeople had to have some good reason to write it.

Edit: maby the zero collision size could be the reason, but i can be turned off via triggers also
 
Last edited:
Level 10
Joined
Apr 18, 2009
Messages
576
Well, the purpose of a dummy unit is more often than not to spawn, do something, and then be removed, right? Giving the unit an expiration timer as soon as it spawns is one way to ensure that it gets removed without us having to worry about that later.

Personally I don't trust hidden units to behave in the exact same way as locused units do. Someone more knowledgable than myself could maybe give you an explanation based on fact though.
 
You can order units with locust just fine.

If you use that method, then you can't use the dummy for special effects. If it is hidden, then the effects attached to it won't show up. If you show the unit, then he'll be selectable (unless you add locust).

Locust is useful for other reasons too. For example, it won't be grouped when you use "Pick every unit in range...", and as such, most spells will naturally ignore dummy units. If they don't have locust, they could be mistakenly picked and damaged, killed, etc. which could cause a bug in the other spell.

And there could be other possibilities too, e.g. if someone has a trigger: unit enters region -> show unit. It would reveal the dummies and then allow them to be selected. That is a very specific case, but it is a possibility.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
If you use that method, then you can't use the dummy for special effects.
True.

Locust is useful for other reasons too. For example, it won't be grouped when you use "Pick every unit in range..."
Hidden units are not picked either by this function.


One more thing I can think of is the additional line of code : o.
Performance-wise hidden units without a model are better than locust units..
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
One more thing I can think of is the additional line of code : o.
Performance-wise hidden units without a model are better than locust units..

that kind of makes sense doesnt it, you dont need to render the unit when it is hidden

And there could be other possibilities too, e.g. if someone has a trigger: unit enters region -> show unit. It would reveal the dummies and then allow them to be selected. That is a very specific case, but it is a possibility.

I could just as much remove locust from the unit when it enters map, but yes the unit will freak out, be unclickable and that kind of stuff
 
Hidden units are not picked either by this function.

I didn't know that. I suppose that makes sense.

Ezekiel12 said:
Performance-wise hidden units without a model are better than locust units..
that kind of makes sense doesnt it, you dont need to render the unit when it is hidden

How so? I can't really imagine they'd be much faster. After all, the GPU doesn't have to render a model in either case (except for dummy.mdx). I don't know the exact workings of a GPU in regards to no model, but I assume they would be pretty similar in that respect. :p Unless you're talking about something else.

edo494 said:
I could just as much remove locust from the unit when it enters map, but yes the unit will freak out, be unclickable and that kind of stuff

Yes, but I assume ShowUnit() is used more than UnitRemoveAbility(u, 'Aloc'). Both are unlikely cases, but I would assume the latter is less likely. :p It is still kind of a moot point--it was just something off the top of my head.
 
Last edited:
Level 5
Joined
Jan 27, 2014
Messages
164
I don't recall, personally, that people advice to use locusted unit with no model etc. Usually hiding units work pretty well as it should. Locust are usually used on missile dummies where you wanna see the missile model. Other than that, a casting dummy is usually hidden upon spawned and ordered to cast spell. And expiration timer works perfectly on hidden units. Make sure they have timed life because hidden units will still take up memory.

Just use hide unit. It makes life simpler. Unless, of course, you want to see the model, then use locust.
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
A casting dummy is usually hidden upon spawned and ordered to cast spell.
Actually no dummy caster resource does that. All of them add locust and use the dummy.mdx.
And expiration timer works perfectly on hidden units.
Yes, but you don't add an expiration timer to a dummy unit. That would kill the purpose of a dummy resource.
However this does not apply when using GUI, because in that case you don't have a dummy resouce :p.
 
Level 10
Joined
Apr 18, 2009
Messages
576
Actually no dummy caster resource does that. All of them add locust and use the dummy.mdx.
What do you mean? Does this mean that no resource uploaded on the hive using dummy casters does that? Then why is that?

Yes, but you don't add an expiration timer to a dummy unit. That would kill the purpose of a dummy resource.
What's a "dummy resource"? A spell using a dummy unit for instance? Why would using expiration timers be undoable? Please elaborate.

However this does not apply when using GUI, because in that case you don't have a dummy resouce :p.
Please elaborate and explain the "resource" part within the context you're using the word. I'm a bit confused with your terminology.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
It is preferred to not use HideUnit for dummies, because dummies in general may or may not be visible. Thus, dummy systems assume that the unit must be visible.
Also, each unit created creates a small memory leak (4kb?). This leak is not possible to fix through known means and thus, it is better to not create and destroy dummies. This is also why dummy systems (systems for manipulating dummies) do not constantly create and remove dummies.
 
What do you mean? Does this mean that no resource uploaded on the hive using dummy casters does that? Then why is that?

because they use Dummy.mdx and locust

What's a "dummy resource"? A spell using a dummy unit for instance? Why would using expiration timers be undoable? Please elaborate.

the dummy caster for example. Since it's better to just use 1 dummy caster for the whole map, adding expiration timer to the dummy caster doesn't make sense
 
Level 10
Joined
Apr 18, 2009
Messages
576
because they use Dummy.mdx and locust
Yes, that is the alternative, but just stating it with a "because" in front doesn't explain the reasoning behind why that is always the preferred alternative. I think you misunderstood my question as well (which is reasonalbe to assume because it was poorly framed in the first place). For instance I wanted to ask: "does 'no dummy caster resource does that' mean 'no dummy caster resource on the hive does that'?". Pretty irrelevant I would say, I don't know why I asked that. Probably related to me not understanding the terminology being used.

the dummy caster for example. Since it's better to just use 1 dummy caster for the whole map, adding expiration timer to the dummy caster doesn't make sense
Thank you for the explanation.
 
locust units doesn't get damaged (at least by normal means, IDK about others) so it's safer to use them

and as Xonok said, dummies might need to be visible. Like if you use dummies for showing special effects (via attach effect, done mostly if you need different sized effects and cannot afford to edit and import multiples of the model), those need to be visible.
 
Status
Not open for further replies.
Top