ive seen some special effects in dota that only a certain player, or a team can see the effect, and will be invisible at the rest, which im sure its not a dummy unit that is invisible, because if it is, then you can see it if you have any gem of true sight or sentry wards
1. the scroll of teleportation ability will create a special effect on where you targeted the item near the tower, enemy units cant see it, while if you are on the enemy's side, the effect is attached to the tower
2. sniper's assassinate ability creates something like a target on the head of the targeted unit, but the targeted unit and its allies cant see the effect
3. admiral's torrent creates bubbles at the target point, but enemy units cant see the bubbles, making it impossible to detect where the torrent is casted for enemy units
ive searched the forums and found 2 threads about it, which has similar answers...here
their answer
the answers works like this, if a player is picked and the picked player is inside a force, a special effect is created at that point, if the picked player is not inside the force, then it will create no effects at all
so if the picked player is inside a force, then it will create a special effect to that point, but what if an enemy is near that point, that means, the player who owns that enemy unit, can see the effect
to simplify, try picking units near a point, if is unit ally, then create effect, else dont create effect, this is simply like adding buffs to allied units, which is really not invisible
the answer is not that accurate, the answers aren't the best solution for creating invisible effects
so my question, how did dota created such as effects that are visible for only a certain player?
1. the scroll of teleportation ability will create a special effect on where you targeted the item near the tower, enemy units cant see it, while if you are on the enemy's side, the effect is attached to the tower
2. sniper's assassinate ability creates something like a target on the head of the targeted unit, but the targeted unit and its allies cant see the effect
3. admiral's torrent creates bubbles at the target point, but enemy units cant see the bubbles, making it impossible to detect where the torrent is casted for enemy units
ive searched the forums and found 2 threads about it, which has similar answers...here
their answer
JASS:
local string s = "MDX\\effect.mdl"
if not IsPlayerInForce(GetLocalPlayer(), udg_Team1) then
set s = ""
endif
call DestroyEffect(AddSpecialEffect(s,x,y))
JASS:
local string s = "MDX\\effect.mdl"
if GetLocalPlayer != Player(0) then
set s = ""
endif
call DestroyEffect(AddSpecialEffect(s,x,y))
the answers works like this, if a player is picked and the picked player is inside a force, a special effect is created at that point, if the picked player is not inside the force, then it will create no effects at all
so if the picked player is inside a force, then it will create a special effect to that point, but what if an enemy is near that point, that means, the player who owns that enemy unit, can see the effect
to simplify, try picking units near a point, if is unit ally, then create effect, else dont create effect, this is simply like adding buffs to allied units, which is really not invisible
the answer is not that accurate, the answers aren't the best solution for creating invisible effects
so my question, how did dota created such as effects that are visible for only a certain player?