Buff only visible to certain players

M4573R

New Member
Reaction score
1
I'd like to achieve an effect like the new ulti for naix in dota. It places an animation above the targets head, but the enemy players can't see it. How do you do this? I want to be able to cast a spell on something and have some kind of animation show up on it until I remove it with triggers. Basically a buff the enemy can't see.
Thanks.
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
Well, you will have to do a dummy unit with that model and every tick of second move that dummy unit at the place of the target unit of ability being cast. Add ghost ability or permanent invisibility. Honestly, i don't know if we use true sight when Naix is in the creep, if i can see the animation as an enemy. Currently, i came up with this solution. If you can see the animation with true sight, this is your answer. If not, i don't know!
 

M4573R

New Member
Reaction score
1
I was afraid I'd have to do that. As long as I don't have too many of them, it shouldn't lag right?
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
Of course not, you will just have to set a variable at the periodic event trigger to remove location. I think you should also remove the location if the unit no longer has the buff. If unit has buff equal to false, custom script it. So, it will be 2 variables removing the location. Honestly, i am not sure about this though, since the location is only an issue of the periodic event trigger, so no, don't make two variables to remove the location.
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
Well, then you might leak. Leak causes lag or some sort of faults, while the map's functions proceed. Setting a variable is to prevent those leaks. An example:
Create 1 Footman (blah blah). Move (Last Created Unit) to the (Center of Region 0000 <gen>). This may cause lag for example (it's not the best example, i just try to make you get it). You will need to set variable for that unit: So, Set LastUnit = (Last Created Unit) and THEN Move (LastUnit) to the (Center of Region 0000 <gen>). Well, know this won't be a problem in Cinematics that much, but for a playable map, it should be set as variable to save memory space (When having actions, it takes up some memory space. The variables "return" the memory space back, cause taking memory space for every of your triggers, it will cause lag or even crash of the game).

On the trigger:

Dummy will have permanent Invisbility ability, Locust, Invulnerable abilities.

Code:
Events
    Unit - A unit Starts the effect of an ability
Conditions
    (Ability being cast) Equal to <YourAbility>
Actions
    Set AngleOfUnit = (Facing of (Target unit of ability being cast))
    Unit - Create 1 Dummy for Player 1 (Red) at (Position of (Target unit of ability being cast)) facing AngleOfUnit degrees
    Set LastUnit = (Last created unit)
    Trigger - Turn on TriggerMove2 <gen>
    Wait X Seconds.
    Turn Off (TriggerMove2) (Comment: Wait X seconds is not accurate exactly, it has this offset of real seconds by 1.5-2, so adjust them, after testing it.)


Code:
TriggerMove2 (NOT INITIALLY ENABLED)
Events
    Time - Every 0.20 seconds of game time
Conditions
Actions
    Set position = (Position of (Target unit of ability being cast))
    Unit - Move LastUnit instantly to position, facing AngleOfUnit degrees
    Custom script:   call RemoveLocation (udg_position)
 
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