I'm trying to make the player invisible when he walks in a vegetation zone.
I used the Dvader scripts ( https://forum.game-guru.com/thread/220144 ) to make a trigger zone where the player is invisible to the ennemies:
function plrinzoneinvisible_init(e)
g_soundPlayed = 0
end
function plrinzoneinvisible_main(e)
g_hidden = g_Entity[e]['plrinzone']
if g_hidden==1 then
if g_soundPlayed == 0 then
PlaySound(e,0)
g_soundPlayed = 1
end
else
g_soundPlayed = 0
end
end
But it only works with the first trigger zone. When you enter the second or third or other triggerzone , the differents scripts and triggerZones enter in conflict beetween themselves.
So I wondered if it was possible to detect when the player is walking into a vegetation area and make it invisible to the ennemies. (hidding in the bush) .
Something like " if IS_IN_VEGETATION then g_hidden=1.
Thanks for your help and ideas.
Cry \"Havoc!\" and let slip the dogs of war
The author of this post has marked a post as an answer.
Go to answer