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 / Post Effect at spawn?

Author
Message
Muzzles56
14
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Ireland
Posted: 5th May 2013 17:31
I have a rain post effect that I want to happen once the player spawns. I have tried placing the player start marker inside the zone, but this only works when the player leaves the zone and enters it again. I have no experience with coding either
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 5th May 2013 19:39
Hi Muzzles56
What script are you using? The rain script for post effects is in the scriptbank\posteffects folder. Is that what your using?
Muzzles56
14
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Ireland
Posted: 5th May 2013 23:38
Yes, that is what I am using
bojandurmic
12
Years of Service
User Offline
Joined: 28th Dec 2011
Location: My home
Posted: 6th May 2013 00:36
That happens to me too I don't know the solution
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 6th May 2013 17:45 Edited at: 8th May 2013 23:12
Quote: "I have a rain post effect that I want to happen once the player spawns. I have tried placing the player start marker inside the zone, but this only works when the player leaves the zone and enters it again."


Let's take a look at the script.



The issue is this. When you spawn at the start, the script is already activated but the engine is still placing the character into position. So the script assumes you are "out of the zone". That is why when you leave the zone and come back, it works.

What you need to do is apply a timer delay. In other words, if you have the zone right where the player spawns, you need to add a delay so the engine will have time to load the level, place the player into position, then when the script runs the post effect, it will say"oh the player is now in the zone" and activate the rain effect. We had a discussion here that is very similar in nature and I explained the delay process and why post effects don't work off the start like what you and the OP of the other thread are trying to do.

So you can do one of a few things. First, move the start marker out of the zone and position so when the player spawns they will hit the zone once they start to move. Second, you can alter the script to turn the rain effect on right away. Or add a delay to the script. Adding a delay would look like this:



The "state=0" and "state=1" lines are the delay timer. If 5 seconds is too short or too long, then you can adjust the "etimergreater=5000" to what you need.


There's no problem that can't be solved without applying a little scripting.

Login to post a reply

Server time is: 2024-11-23 14:20:31
Your offset time is: 2024-11-23 14:20:31