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 need help with Fpgcrawtext

Author
Message
CrescentMoon
14
Years of Service
User Offline
Joined: 28th Apr 2010
Location:
Posted: 23rd Aug 2010 19:41
okay so I'm using fpgcrawtext in my game to the fullest, cause it's convenient and less lag-inducing than the few hundred HUD's I'd require otherwise. Except a few problems, I can't seem to get it to work for me at all.



This script is for a gun I place directly underneath the player's spawn point.

The text is supposed to appear for 3 seconds, then change into another text line. So:

1. First line of text appears
2. 3 seconds later, second line appears
3. 3 seconds later, second line vanishes.

What happens is, the player enters the zone, equips the gun, then the first line of text flashes past. I don't even see the second line appear.

What am I doing wrong there?

Also I have another one set up for a Radio in the room.



The radio is supposed to play the steam noise (which sounds like static) for 5 seconds. While the steam noise is playing and the text is going the player is supposed to be disabled (frozen). The first line of text is supposed to appear when the radio starts playing, the second line after 5 seconds, and the player regains control after 10.

Instead of all this, the first line of text flashes on and off over and over again, the steam plays for 5 seconds, and the player can't move at all, indefinately.

What's going on with these two scripts ;c

[WIP] Paranorma Chapter 1, The Horror at Silent Inn
Level 1 - Suspended
French gui
20
Years of Service
User Offline
Joined: 11th May 2004
Location: France
Posted: 23rd Aug 2010 23:04 Edited at: 23rd Aug 2010 23:11
Try this: (thus untested...)



Quote: "
Instead of all this, the first line of text flashes on and off over and over again, the steam plays for 5 seconds, and the player can't move at all, indefinately.
"


Try to fix this one yourself: look at the 3rd line: you're constantly reseting your timer and freeze the player...
CrescentMoon
14
Years of Service
User Offline
Joined: 28th Apr 2010
Location:
Posted: 24th Aug 2010 01:19 Edited at: 24th Aug 2010 03:44
I adjusted the scripts to this:

Handgun Pickup


Radio


They still don't work.

[WIP] Paranorma Chapter 1, The Horror at Silent Inn
Level 1 - Suspended
ctm
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 24th Aug 2010 13:48
The radio script does not work because in state=2 is the timerstart and the timergreater condition!
Scripts are looping. That means the timer gets started every frame again. So the timer cannot become greater than 3000:

:state=2:timerstart,plrdisable=10000,fpgcrawtext=Did this radio just turn itself on? How?
:state=2,timergreater=3000:state=3

This way it works:



If you are using v.1.17 or v.1.18 i recomment to use etimerstart and etimergreater=x instead of timerstart and timergreater=x.
I realised that in this versions the old timer doesnt work reliable.

The pickup script cannot work this way because the script stops running when the playertake action gets executed.
Maybe the inworld entity gets destroyed when picked up..i don't know. You would have to take a look at the source code to see what exactly happens.

A possible solution would be to play the pickup sound when player comes close to the entity and make it invisible by using the setalphafade=X action (+ coloff).

Then the timers and the rawtext.
And only at the end of the script the playertake action.
CrescentMoon
14
Years of Service
User Offline
Joined: 28th Apr 2010
Location:
Posted: 24th Aug 2010 19:26
Quote: "The pickup script cannot work this way because the script stops running when the playertake action gets executed.
Maybe the inworld entity gets destroyed when picked up..i don't know. You would have to take a look at the source code to see what exactly happens.

A possible solution would be to play the pickup sound when player comes close to the entity and make it invisible by using the setalphafade=X action (+ coloff).

Then the timers and the rawtext.
And only at the end of the script the playertake action. "


or for the pickup script I could just make a trigger there. The trigger supplies both lines of text, the weapon is ordered to be picked up at the proper point, and the entire thing works

thanks! :3

[WIP] Paranorma Chapter 1, The Horror at Silent Inn
Level 1 - Suspended

Login to post a reply

Server time is: 2024-11-24 19:31:53
Your offset time is: 2024-11-24 19:31:53