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 / I'm a new scripter and I don't know why my scripts aren't working?

Author
Message
TheWzrd
10
Years of Service
User Offline
Joined: 19th Apr 2014
Location:
Posted: 20th Apr 2014 00:45
Hi guys, I'm new, so please forgive me if I make any mistakes.

Anyways, I recently tried two scripts, to see if I had what it takes. One script was to use a button on the keyboard to pick up the key instead of just walking over it. The second was a script to stop the door from saying a key is required to open it, even though you have the key. I wrote them in notepad, and called them "keydooruse.fpi" and "kepickup.fpi" I put these scripts in a folder called "my scripts" in the scriptbank folder where the usual scripts are. Here is what I have...

This is the "keydooruse" script.



and this one is the "keypickup" script.



~L~
SirHaXalot
11
Years of Service
User Offline
Joined: 4th Sep 2012
Location: cyberspace
Posted: 20th Apr 2014 03:48
just to rule out the obvious, did you assign these scripts to the correct entities in the editor?

I game. Period
TheWzrd
10
Years of Service
User Offline
Joined: 19th Apr 2014
Location:
Posted: 20th Apr 2014 17:17
Yeah I assigned the "keypickup" one to the key, and the "keydooruse" to the door.

~L~
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 20th Apr 2014 20:47
Hi TheWzrd.. and welcome to the FPSC forums.
A quick look at your "keypickup" script and noticed afew problems.
Semicolon's used in a script are "ignored" by the engine.
Also your "hud names" didn't matchup. Take a look at some changes I made and see if it works better. Mainly the "hud" names and using a "colon" instead of semicolon at state=10.


Quote: "stop the door from saying a key is required to open it"

As far as the door hud, just remove the line from your script pointing to that hud. Is that what you mean?

You know you're a bad gamer when you're able to run out of infinite lives.

Login to post a reply

Server time is: 2024-04-25 00:47:54
Your offset time is: 2024-04-25 00:47:54