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 / Investigation/Radio scripts (help please)

Author
Message
BedsideReaper
13
Years of Service
User Offline
Joined: 4th Feb 2011
Location: Lakewood, WA
Posted: 16th Nov 2013 10:31
Hey, guys. I'm having some problems with two scripts in particular that I've been working on for the past few days. One is supposed to show a small symbol, notifying the player that the object(s) in front of them can be investigated to show further background story or more insight on how to finish the level. And when the action button is pressed: a hud pops up informing the player of the protagonist's opinion/insight. Everything works up until I press the action button, and the player insight is shown twice. The script is listed below:



The other one that I've been having a problem with is this radio fadeout script. I found a previous post that showed in essence, how to make music fade when you walk away from an entity. I added conditions to make it so the player has to turn on the radio first. After that, it stopped working and now I can't get it to function properly again. The script in question is listed below as well:



Thanks to anyone that can help. I've been away from FPSC for too long. I haven't even been able to make my Reloaded pledge yet. Also, if you guys needed to see for yourselves what's happening, you can find a video here (quality's low):

http://youtu.be/NZ9JNPINpW0

Sorry if I sound needy.
BedsideReaper

"I think I'm getting the 'Black Lung,' pop."

"Derrick, you've been down there for one day."
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 18th Nov 2013 15:50
BedsideReaper
Just guessing here, but to me it looks like your calling
on the same "hud" twice. Before and after "plrusingaction"
This is the line I'm talking about.

Try a different approach..

Tested and works fine when replaced with my hud's.

You know you're a bad gamer when you're able to run out of infinite lives.
BedsideReaper
13
Years of Service
User Offline
Joined: 4th Feb 2011
Location: Lakewood, WA
Posted: 23rd Nov 2013 13:28
Thanks ncmako! However, there was one tiny glitch. Everything worked fine, however, the investigate icon would disappear unexpectedly and never return even if I walked up to the entity again. I modified it to fix it. Here you go, everyone! Free investigate script!



However, I still haven't got the music fade script working. Can anybody help me with that?

"I think I'm getting the 'Black Lung,' pop."

"Derrick, you've been down there for one day."
Corno_1
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 23rd Nov 2013 15:09 Edited at: 23rd Nov 2013 15:10
ok, let us try to fix it:
This is your start script:


So, now we watch every line:
Quote: ":plrdistwithin=50:hudshow=useswitchprompt,hudfadeout=useswitchprompt
"

This line we should write to:
:state=10,plrdistwithin=50:hudshow=useswitchprompt,hudfadeout=useswitchprompt
Because you can not turn your radio off in your script

Next line:
Quote: ":state=10,plrdistwithin=50,plrusingaction=1:plrsound=$0,activateifused=1,alttexture=0,state=2"


I did not understand why you use plrsound=$0 and alttexture=0, did you give your plr a sound? And why using alttexture=0 when no alttexture=1 is in your script. What I also not understand is activateifused=1? did your radio activate someting?
=> :state=10,plrdistwithin=50,plrusingaction=1:state=2

The next line is crazy:
Quote: ":state=2,plrdistwithin=50,plrusingaction=1:sound=$1,music=audiobank\dmfe\radio.ogg,state=3,plrsound=$0,activateifused=0,alttexture=0,state=4
"

Ok I can understand sound=$1 if you did a switch on sound in your radio settings, but state=3 and state=4 in one line?
=> :state=2,plrdistwithin=50,plrusingaction=1:sound=$1,music=audiobank\dmfe\radio.ogg,state=4

The next I did in one step:


All is good, but switch your radio off if you are too far away My radio is not as inteligent
=>:state=5,plrdistfurther=300:state=4

As result I get this:



I hope this script works. I hope I also could show your faults! Maybe I did a mistake, but you can correct me, if I did something wrong.

Corno_1

Make this forum to something a little bit better and release more stuff. So we can push the Request/NoobHelp threads aside.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 25th Nov 2013 16:11
@ Corno_1
Hey that's pretty good. Nice work
If you don't mind I'd like to keep this one. May come in
handy sometime
best

You know you're a bad gamer when you're able to run out of infinite lives.
Corno_1
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 25th Nov 2013 18:09
@ncmako I donĀ“t mind

Make this forum to something a little bit better and release more stuff. So we can push the Request/NoobHelp threads aside.

Login to post a reply

Server time is: 2024-04-19 15:36:48
Your offset time is: 2024-04-19 15:36:48