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 / Please, need help with this script

Author
Message
Hideck Goh
13
Years of Service
User Offline
Joined: 9th Sep 2011
Location:
Posted: 9th Sep 2011 14:04 Edited at: 6th Oct 2011 03:54
Hi. I´m trying to edit a script, but have problems in the last line (i guess). The script is the follow: the player walk to an entity (a book or something like that), a message says "press enter to use". When the player press enter, the game freeze and a image show up. When the player press enter again, the picture gone and the game unfreeze. The problem is when the player press enter for the second time, the game do not unfreeze. If someone can help me, please take a look. Thanks in advice and sorry for the bad english.

:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=book,hudhide=1,hudmake=display,state=10
:plrdistwithin=50:hudshow=book,hudfadeout=book

:state=10:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\Note.png,hudname=message,hudhide=1,hudmake=display,state=1

:state=1,plrdistwithin=60:state=2
:state=2,plrusingaction=1:hudshow=message,plrfreeze=30000,etimerstart,state=3
:state=3,etimergreater=250,plrusingaction=1:state=4
:state=4:hudunshow=message,plrfreeze=0,state=1
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 6th Oct 2011 07:55
First off, when you define your huds, you should always define them in the beginning states (":state=0:"). There have been many that try to define a hud in the middle of the script and it just does not work. So the beginning should be like this:



Then (if it were me), I would have this next:



Now, the first thing I did was define your huds in the state=0 lines. Also when the player is 50 units within the entity, it shows the book hud. I also changed the "plrusingaction=1" to "scancodekeypressed=28" (I like using this method myself). The player presses Enter, the message shows and they freeze. When Enter is pressed again, the message disappears and they unfreeze. When the player moves 60 units away from the entity, the script goes back to the beginning and starts again.

I am not too sure if this is for certain, but the reason the player did not freeze is possible because you were in close proximity to the entity and the script did not know what to do. That's why I myself like using the "plrdistfurther" command to tell the script when the player moves away then do this.

Another way to write the script is this:



Hope that gets you on the right path.


Twitter: @NFoxMedia
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 6th Oct 2011 07:55
Try adding the condition plrusingaction=0 into the last line:

Quote: ":state=4,plrusingaction=0:hudunshow=message,plrfreeze=0,state=1"


Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 6th Oct 2011 07:57
Ha - Synchronised posting

BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 6th Oct 2011 07:57
Good catch, Ched80. I forgot about that too.


Twitter: @NFoxMedia
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 6th Oct 2011 07:57
Now that is scary


Twitter: @NFoxMedia
Hideck Goh
13
Years of Service
User Offline
Joined: 9th Sep 2011
Location:
Posted: 27th Oct 2011 05:22
BlackFox, your script work well. But now there´s a new problem, and i hope somebody can help me. I´m not good with english language, so i take some pictures for you to understand the situation.


1 - The character walks into the room. When near an object, the game display the "message press enter to use". The script works well here.



2 - When player press enter, the game freeze and display an image, showing some clues about the storyline. If the player press enter again, the game unfreeze and the player can continue the game. The script works fine here too.



3 - The player find another clue. The game show the message "press enter to use".



4 - The image above should be displayed, but it´s not happen! Instead, the game displays the first image again. And this happens every time I press enter to investigate something, only the first image is displayed. All images have different names, and each has its own script, but still only the first appears on any level.
If anyone can help me, I thank you in advance.
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 27th Oct 2011 15:18 Edited at: 27th Oct 2011 15:20
did you change the filenames in both hudimagefine=X and hudshow/hudunshow=x in the scripts?
did you change the hud-images itself? happens sometimes when something went wrong when copy/paste


btw.: nice female model. from where you get this? i am searching for some more female characters with good shape and nice animations for my game atm.
Hideck Goh
13
Years of Service
User Offline
Joined: 9th Sep 2011
Location:
Posted: 27th Oct 2011 17:06
Thanks for the tip, I'll see if changes were made in the scripts.
As for the model I'm using Reallusion iClone to make the animations and images.

Login to post a reply

Server time is: 2024-11-24 05:07:01
Your offset time is: 2024-11-24 05:07:01