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 / Need help with a script

Author
Message
Hexy123
15
Years of Service
User Offline
Joined: 14th Jul 2009
Location: Melbourne
Posted: 21st Nov 2009 03:41 Edited at: 21st Nov 2009 03:42
Well I've been modifying a script for my game. But i can't get it to work

Anyway if anyone could help that would be nice

;Artificial Intelligence Script

;Header

desc = show Hud, Press B, show second hud

;Triggers

:state=0,plrwithinzone=1:activateifused=1,state=1

:state=1,plrwithinzone=1:hudreset,hudx=50,hudy=80,hudimagefine=languagebank\english\gamecore\text\user\waterlood.dds,hudname=firstmessage,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=80,hudimagefine=languagebank\english\gamecore\text\user\text.dds,hudname=secondmessage,hudhide=1,hudmake=display,state=10
:state=10:timerstart,hudshow=firstmessage,sound=audiobank\tutorialmessage\messagebleep.ogg,state=11
:state=12,scancodekeypressed=48:hudfadeout=firstmessage,state=13
:state=11,timergreater=1000:sound=audiobank\tutorialmessage\message.ogg,state=12
:state=13:timerstart,hudshow=secondmessage,sound=audiobank\tutorialmessage\messagebleep.ogg,state=14
:state=14,timergreater=1000:sound=audiobank\tutorialmessage\message.ogg,state=15
:state=15,scancodekeypressed=48:hudfadeout=secondmessage,state=16




;End of Script


Thanks
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 22nd Nov 2009 22:46
What's wrong with it?


The one and only,


BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 23rd Nov 2009 00:51 Edited at: 23rd Nov 2009 01:55
An interesting idea to a script.

If I were to take a guess to why it may not be working correctly...

1. Would the correct syntax be:



Remove the "activateifused=1" because player is using "B". Or does that matter?

2. Then it would be:



Instead of the above all on one line...

Then it's the rest...

Cheers

Mike
Hexy123
15
Years of Service
User Offline
Joined: 14th Jul 2009
Location: Melbourne
Posted: 23rd Nov 2009 05:41 Edited at: 23rd Nov 2009 05:44
Thanks i'll try that.
let me explain what is actually wrong, it shows the first hud, but the second hud won't show after B. the first hud doesn't actually disapear
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 23rd Nov 2009 07:04 Edited at: 23rd Nov 2009 07:10
The source I usually turn to for a scripting issue is Plystire. He has so much knowledge that you can learn a lot from him (as well as others).
I am still learning the scripting, and most of the time the scripts I write it ends up being a syntax error where I've used a colon instead of a comma, etc.

I found this script in the forum for you. Perhaps this is close to what you may be looking for:



From this script, you approach an object and a hud comes up. You move away and approach a second time and a second hud comes up.

I'm certain you could use the same format but alter it to include your "scancodekeypressed" into the script, as well as sound.

Another great source of scripting is the Official Community Guide to FPSC. You can find it here:

http://forum.thegamecreators.com/?m=forum_view&t=131868&b=21

There are some great scripts in this guide that you can learn from and manipulate to your needs. There are more scripts here:

http://forum.thegamecreators.com/?m=forum_view&t=142864&b=23

Last, don't be afraid to experiment. That's how all of us learn.

Hope some of this helps.

Cheers

Mike
Hexy123
15
Years of Service
User Offline
Joined: 14th Jul 2009
Location: Melbourne
Posted: 23rd Nov 2009 09:05
Well thanks for the help, I'll definetly check those out.

Login to post a reply

Server time is: 2024-11-25 05:48:22
Your offset time is: 2024-11-25 05:48:22