Scripts / Trigger Zone only activate one time ? How to make it not disappear ?

Author
Message
Bracer
4
Years of Service
User Offline
Joined: 2nd Jun 2019
Location:
Posted: 4th Apr 2022 23:20
Trigger Zone only activate one time ? How to make it not disappear ?
I walk over the trigger zone and it does some stuff besides play a sound, cool.
But then it is gone ?
Can it not be gone after that one time ?
PM
UNIRD12B
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 2nd May 2014
Location: Canada
Posted: 5th Apr 2022 13:33 Edited at: 5th Apr 2022 13:54
Did you try using
PlayerInZone.lua

UNIRD12B
Let\'s actually make something happen with this one !
Bracer
4
Years of Service
User Offline
Joined: 2nd Jun 2019
Location:
Posted: 5th Apr 2022 16:41
I couldn't find "PlayerInZone.lua" UNIRD12B :-(
PM
bluemeenie195
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 5th Apr 2022 17:11
Try This
PM
bluemeenie195
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 5th Apr 2022 17:12
p_sound ={}
function soundinzone_init(e)
p_sound[e] = 1
end

function soundinzone_main(e)
if g_Entity[e]['plrinzone']==1 then

if p_sound[e] == 1 then
LoopSound(e,0)
p_sound[e] = 0
end
end
if g_Entity[e]['plrinzone']==0 and p_sound[e] == 0 then
p_sound[e] = 1
StopSound(e,0)
end
end
PM
Bracer
4
Years of Service
User Offline
Joined: 2nd Jun 2019
Location:
Posted: 5th Apr 2022 18:24 Edited at: 5th Apr 2022 19:06
Thank you bluemeenie195, but I don't know if that triggers the visibility of other meshes.
I appreciate what you have shared bluemeenie195 but it looks like this wouldn't do...I will have to read up on the lua manual for Game Guru Max, is one available ?

Edit:
Found it:
https://steamsolo.com/guide/gameguru-lua-scripting-summary-and-guide-gameguru/
PM
bluemeenie195
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 5th Apr 2022 20:14
Yeah, sorry that only works with sound, but can easily change for hiding and showing things.
PM
Bracer
4
Years of Service
User Offline
Joined: 2nd Jun 2019
Location:
Posted: 6th Apr 2022 01:10 Edited at: 6th Apr 2022 01:15
Yeah you are right, but your attempt to want to help is appreciated bluemeenie195.
I wonder whether there is an object._visible = true or false or something like that, I will check it out for fun

Update: Oh there is !
Hide(e)
Show(e)
Yeah !
PM

Login to post a reply

Server time is: 2024-04-16 09:53:44
Your offset time is: 2024-04-16 09:53:44