Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / [Question] Using a Switch, Playing Sound, Destroy Switch

Author
Message
ASTECH
17
Years of Service
User Offline
Joined: 18th Jul 2007
Location:
Posted: 12th Jan 2012 21:33 Edited at: 12th Jan 2012 21:50
I'm wondering if anyone can help me out here.

I've been messing around with the standard "switch" script and in one instance, I made it where the switch would activate the ifused,
play the sound, and then upon pressing the use key a second time, would destroy the switch.

I know it probably sounds easy but what I really need is the switch script to change the hud for the object after pressing it the
1st time. Upon pressing the switch the second time, the entity is completely destroyed.

I've been experimenting but I cannot ever get it 100% right. If anyone would like to help me, I'd appreciate it. This script is crucial to the gameplay.

Whoever said that Intel graphics fail, obviously never owned a Core i5.
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 12th Jan 2012 22:46 Edited at: 12th Jan 2012 22:47
description:

dimvar=switch,setvar=0
plrwithin=80:showhud=presskey
plrwithin=80,keypressed(1),varequal=switch 0:targetname=X,activatetarget=X,unshow=presskey,showhud=activate,setvar=switch 1
plrwithin=80,keypressed(2),varequal=switch 1:destroy

?

should be something like that.
ASTECH
17
Years of Service
User Offline
Joined: 18th Jul 2007
Location:
Posted: 12th Jan 2012 23:05 Edited at: 13th Jan 2012 00:49


No its this one. I'm sorry for not being so specific.

Actually, this script is optional now. I scrapped this idea because the way I had the game, it involved too much "hand holding".
This script could still fair useful... but I think I've come to a compromise.

Whoever said that Intel graphics fail, obviously never owned a Core i5.
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 13th Jan 2012 11:24
well, if you want the entity to get destroyed you simply have to delete the ":state=3,plrusingaction=0:state=10" loopback into ":state=3,plrusingaction=0:destroy" and then edit the destroyscript to play specific decal and destroysound.

Login to post a reply

Server time is: 2024-11-24 01:58:48
Your offset time is: 2024-11-24 01:58:48