Why is my Locust unit selectable?

Maelbog

Member
Reaction score
3
I made a custom Inferno ability but without the Infernal summon.
I replaced the Infernal with a dummy unit.
The dummy unit has the model of the special effect that i want (Earthquake).
I gave it Locust and Invulnerable.
Only problem is I can select it even if it's Locust..Anyone knows why and how to fix it?

P.S.
Be right back after 8 hours.
 

vypur85

Hibernate
Reaction score
803
That's probably because the Infernal ability intrinsically hides the unit once it's casted and unhide the unit again after the delay time. Hiding and unhiding will remove the Locust function.

An alternative to this is to trigger the unhiding.
Event: Unit enters playable map area
Condition: Unit-type (Triggering unit) Equal to YourUnitType
Actions:
- Unit - Unhide (Triggering unit)
- Custom script: call UnitAddAbility ( GetTriggerUnit() , 'Aloc' )

However, this method will cause the unit to 'appear' to be spawned immediately. It's alright if you don't need the delay time.

Otherwise, just add a little wait before you unhide the unit. And then it'd work fine.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
That's probably because the Infernal ability intrinsically hides the unit once it's casted and unhide the unit again after the delay time. Hiding and unhiding will remove the Locust function.
I didn't know that :eek:

Alternatively, you could use the A unit Spawns a summoned unit event, and replace the spawned unit with your dummy if it's an Infernal.
 

Maelbog

Member
Reaction score
3
It tried both, it's still selectable.

I even tried combining both triggers into this:

Code:
SpellEffect
    Events
        Unit - A unit Spawns a summoned unit
    Conditions
        (Unit-type of (Summoned unit)) Equal to SpellEffect
    Actions
        Unit - Replace (Summoned unit) with a SpellEffect using The old unit's relative life and mana
        Unit - Unhide (Last replaced unit)
        Unit - Add a 2.00 second Generic expiration timer to (Last replaced unit)
        Animation - Change (Last replaced unit)'s animation speed to 50.00% of its original speed
        Custom script:   call UnitAddAbility ( GetLastReplacedUnitBJ() , 'Aloc' )

*The Unhide (Last replaced unit) manages to add Locust, therefore making it unselectable, but the damage and stun part of the ability doesn't take effect.
Removing the Unhide part enables the ability to deal the damage and inflict stun, but makes the model selectable.

I think I'll just have to trigger the timing as well as appearance of the effect by creating the model rather than making use of the summon from the ability.
 

vypur85

Hibernate
Reaction score
803
I personally tried it and it worked. Can you post your version of the 'uncombined' trigger?
PFreak method doesn't require you to unhide it though.

Remember to remove Locust from your summoned unit in the Object Editor. Otherwise the ability addition will serve no purpose (no point adding an ability to a unit who already has that ability). Here is my trigger for your reference:

Code:
    Events
        Unit - A unit enters (Playable map area)
    Conditions
        (Unit-type of (Triggering unit)) Equal to Footman
    Actions
        Wait 1.00 game-time seconds
        Unit - Unhide (Triggering unit)
        Custom script:   call UnitAddAbility ( GetTriggerUnit () , 'Aloc' )
> I didn't know that
I just found this out when I was doing the test to answer this thread. :p Pure serendipity.
 

dracolich

TH.net Regular
Reaction score
15
>Remember to remove Locust from your summoned unit in the Object Editor
guess thats why trigger didnt work for him.
and this bug with locust is known enough for any dota's coders -(
 

vypur85

Hibernate
Reaction score
803
and this bug with locust is known enough for any dota's coders -(
Yes and no. I don't code DotA but I know. Then again...

The serendipitous moment was referring to this:
That's probably because the Infernal ability intrinsically hides the unit once it's casted and unhide the unit again after the delay time.
No wonder Lina Inverse's and Tormented Soul's ability leaves a weird dummy on the ground upon casted. No, wait, that's DotA. I guess IceFrog knew that a long time ago.

:)
 

dracolich

TH.net Regular
Reaction score
15
well, he isnt interested in fixing such non-vital stuff, so probably you are right
 

Maelbog

Member
Reaction score
3
Yes I didn't remove the ability from Object Editor.
I changed the summoned unit into a dummy with no model.
Then I triggered the creation of a dummy unit with the model of the effect.
I played the birth animation and It's perfect.

Still thank to both of you for this knowledge.
I really didn't know about that part yet.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top