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 / undeclare a variable

Author
Message
Jeremiah
18
Years of Service
User Offline
Joined: 9th Sep 2006
Location:
Posted: 23rd Sep 2007 00:17 Edited at: 23rd Sep 2007 00:41
I am trying to undeclare scancodekeypressed I have tried setting it to scancodekeypressed=0 but this has no effect.

Lets say I code a script to scancodekeypressed=2 and the player enters 1 now this does an action. But lets say I go down to state20: where I want the character to enter 1 again for a new action, unfortuantly this doesn't work

Here is a sample


Quote: ";Header

desc = Advanced Conversation FPI -- This is where you talk to steve

;Triggers

:state=0:hudreset,hudx=50,hudy=65,hudimagefine=hudshud_askquestion.png,hudname=talk1,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=65,hudimagefine=hudshud_question1_response1.png,hudname=talk2,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=65,hudimagefine=hudshud_question1_response2.png,hudname=talk3,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=65,hudimagefine=hudshud_question1_response3.png,hudname=talk4,hudhide=1,hudmake=display,state=1


; Player walks up to entity, entity turns to player and gives a statement, player is presented with 3 choices

:state=1,plrdistwithin=60,plrusingaction=1:rotatetoplr,hudshow=talk1,state=3
:state=3,scancodekeypressed=2:hudfadeout=talk1,hudshow=talk2,state=10
:state=3,scancodekeypressed=3:hudfadeout=talk1,state=20
:state=3,scancodekeypressed=4:hudfadeout=talk1,hudshow=talk4,state=30

:state=10,plrusingaction=1:hudfadeout=talk2,state=99
:state=20,plrdistwithin=60:runfpi=peopleTALKTOME_2.fpi,state=0
:state=30,plrusingaction=1:hudfadeout=talk4,state=99
"


This is the second FPI script where I try to have the player make the choice again.



Quote: ";Header

desc = Advanced Conversation FPI -- Part 2 of Talk to Steve

;Triggers

:state=0:hudreset,hudx=50,hudy=65,hudimagefine=hudshud_question1_response2.png,hudname=talk5,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=65,hudimagefine=hudshud_question2_response1.png,hudname=talk6,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=65,hudimagefine=hudshud_question2_response2.png,hudname=talk7,hudhide=1,hudmake=display,state=1


; Player walks up to entity, entity turns to player and gives a statement, player is presented with 3 choices

:state=1,plrdistwithin=60:hudshow=talk5,state=2
:state=2,scancodekeypressed=2:hudfadeout=talk5,hudshow=talk6,runfpi=peoplecoward.fpi
:state=2,scancodekeypressed=3:hudfadeout=talk5,hudshow=talk7,runfpi=peoplestrafe.fpi
"


As you can see from the code, I am using a second script for the next set of questions. It makes no difference if I write the code in one FPI or two It still trys to jumble through all at once when I try to interact with the entity.
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 23rd Sep 2007 18:02
While I have not gone through the entire script (just looked at it briefly) you may want to use keys other than those assigned to the game by the engine. From experience, I know that the game assigned keys won't work properly, and the number keys are assigned to weapons.

Best.

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

Jeremiah
18
Years of Service
User Offline
Joined: 9th Sep 2006
Location:
Posted: 23rd Sep 2007 19:58 Edited at: 23rd Sep 2007 19:59
Thanks for your response, I have also tried that and have assigned scankeycodepressed to other alpha numberic combinations and this also has no effect

Would it be easier for you to go through it if I packed up everything including the huds into a zip file for you to install and look at?

I know your the resident fpi expert, so any help you can give would be appreciated.
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 23rd Sep 2007 20:21
Jeremiah,

At the moment, I'm a little busy with the PGP level comp and the race is about to start, so I'm just jumping in and checking the forum quickly. While there are a couple of scripting gurus here, I assure you that I've simply stood on the shoulders of giants to get a better view.

Attached are some scripts by the master and should give you some insight.



Best.

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

Jeremiah
18
Years of Service
User Offline
Joined: 9th Sep 2006
Location:
Posted: 23rd Sep 2007 21:20
Those are way below what I am atempting. I will try to explain a little later what my exact purpose is. I have also sent off an email to lee asking for helping regarding this problem.

I am actually thinking that FPSC does not have the scripting capabilities to handle full conversation based system without changing the used variable ever iteration.

Login to post a reply

Server time is: 2024-11-23 23:00:46
Your offset time is: 2024-11-23 23:00:46