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 / Asking Questions to AI

Author
Message
Thistle Studios
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: Kirkcaldy
Posted: 16th Sep 2007 14:18
I need some help here on how to fix this problem. Ive created a simple script which you attach to a trigger zone and, using the numpad keys that correspond with the question number, gives you a reply.

The only problem is it doesn't display, after several failed attempts at fixing the problem, i'd like to ask you how to fix it.

Here is the code, if you can analyse the problem, and explain to me how it can be fixed, that would be great.



Im a new user, im young and FPI-dyslexic, i simply dont have the foggiest and cant learn FPI, so copy and paste code snippets please!
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 17th Sep 2007 02:05 Edited at: 17th Sep 2007 02:09
Quote: ":state=2:scancodekeypressed=79,state=3
:state=2:scancodekeypressed=80,state=4
:state=2:plrwithinzone=0,state=0"



scancodekeypressed and plrwithinzone are conditions. Conditions go before the second comma, and actions go after it.

:state=2,scancodekeypressed=79:state=3
:state=2,scancodekeypressed=80:state=4
:state=2,plrwithinzone=0:state=0"

Best.

I'm sorry, my answers are limited. You must ask the right question.

Thistle Studios
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: Kirkcaldy
Posted: 17th Sep 2007 18:50
Problem 1: Fixed.
New Problem, it displays answer 2 and doesnt go away, not after 5 seconds, not even when i leave the trigger zone. Can anyone else help with this problem?



Im a new user, im young and FPI-dyslexic, i simply dont have the foggiest and cant learn FPI, so copy and paste code snippets please!
Thistle Studios
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: Kirkcaldy
Posted: 17th Sep 2007 18:52
Sorry, didnt re-edit the code properly when i posted, here is the code:

;Artificial Intelligence Script
;by Peter Davidson
;Header

desc Asking Questions
;Triggers

:state=0:plrwithinzone=1:state=1

:state=1:hudreset,hudx=50,hudy=60,hudimagefine=languagebank/english/gamecore/messages/ask1r1.bmp,hudname=askprt1,hudhide=1,hudmake=display,state=2

:state=2:hudshow=askprt1
:state=2:scancodekeypressed=79:state=3
:state=2:scancodekeypressed=80:state=4
:state=2:plrwithinzone=0:state=0

:state=3:hudreset,hudx=50,hudy=60,hudimagefine=languagebank/english/gamecore/messages/ask1r1.bmp,hudname=askprt2,hudhide=1,hudmake=display,state=5

:state=4:hudreset,hudx=50,hudy=60,hudimagefine=languagebank/english/gamecore/messages/ask1r2.bmp,hudname=askprt3,hudhide=1,hudmake=display,state=6

:state=3:hudshow=askprt2
:state=3:timerstart,state=5
:state=4:hudshow=askprt3
:state=4:timerstart,state=6
:state=5,timergreater=5000:state=7
:state=6,timergreater=5000:state=8
:state=7:hudunshow=askprt2,state=2
:state=8:hudunshow=askprt3,state=2

;End of Script

Im a new user, im young and FPI-dyslexic, i simply dont have the foggiest and cant learn FPI, so copy and paste code snippets please!
Thistle Studios
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: Kirkcaldy
Posted: 17th Sep 2007 19:07
Oh, use the code in the original post sorry, its very confusing

Im a new user, im young and FPI-dyslexic, i simply dont have the foggiest and cant learn FPI, so copy and paste code snippets please!
Thistle Studios
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: Kirkcaldy
Posted: 17th Sep 2007 22:04
Could a Moderator Please Lock this thread, thanks

Redirected to http://forum.thegamecreators.com/?m=forum_view&t=114525&b=23

Im a new user, im young and FPI-dyslexic, i simply dont have the foggiest and cant learn FPI, so copy and paste code snippets please!

Login to post a reply

Server time is: 2024-11-23 23:35:26
Your offset time is: 2024-11-23 23:35:26