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 / scripting riddle: SETPOSTPROCESS

Author
Message
The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 16th Aug 2012 19:09 Edited at: 16th Aug 2012 19:16
This time I am completely clueless myself

Ths script shows the postprocess effect:


But these 2 don't and I have no idea why:




The only difference is the placement of this line: setposteffect=motionsickness

the original script is a 'bit' longer, it took me allready 2 hours to isolate the problem down to these lines.

And no guesses please

In case you find my grammar and spelling weird ---> native German speaker ^^
Mr illusionest
15
Years of Service
User Offline
Joined: 5th Mar 2009
Location: Cairo , Egypt
Posted: 16th Aug 2012 19:19
I don't know what's the problem in the 2nd script , but in the 3rd one , the script will keep calling the effect many times until the state is changed , this causes many problems and may lead to crashing .
My suggestion is : try to use lower states instead of 200s , It doesn't make sense but you can try .

actually the program acts strangely at many aspects . I tried to get a script to play a sound file with no use at all . the sound just won't play . the problem was that the script template was a copy of ammoglow.fpi (don't know how can this be a problem) . anyway I copied another script file and placed the SAME lines , and voila !

"I am the night visitor when everyone is sleep , and when the last light fades"
The illusionest
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 16th Aug 2012 19:39 Edited at: 16th Aug 2012 19:58
The solution is quite simple. State numbers are not the issue. You can go from "state=0" to "state=500" as long as you do not exceed the script cap.

Allow me to illustrate using the second script you have here (I used this one in my testing):



You need to have a pause in between the first line and "state=200". I have noticed this when attempting similar scripts. From what I can figure out, the level loads and by the time the player is brought into the level and can begin to move, the script has already processed. So we add "pauses" in the beginning and it works for us.

Your second script works using the following:



Notice I have the "etimerstart" at the beginning and allowed a 5 second pause before the script continues. It allows the player to enter the level and be able to see the transition.

This was tested in our v1.17 source and worked for us. Script is attached to a trigger and starts processing as soon as the level loads. The following are screenshots:

Starting out


Motion sickness process kicks in


Motion sickness process still running


Process ends, back to normal


**ADDITIONAL**

Your third script worked fine for me as it is. Motion sickness was visible as soon as I entered the level. It was only the second script I had to add the "etimer" to have the process start.


Twitter: @NFoxMedia
The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 16th Aug 2012 21:01
Thanks BF!

It still doesn't work in the longer script but it may be the timing issue you told me about, I'll look into it

BTW: what cool game is this, you're obviously working at???

In case you find my grammar and spelling weird ---> native German speaker ^^
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 16th Aug 2012 21:19
Quote: "It still doesn't work in the longer script but it may be the timing issue you told me about, I'll look into it "


I still believe it is a processing and timing issue as I mentioned. Here is further results from more testing.

I took your second script...



... and applied to a trigger. When the level starts and the player spawns, that trigger script has already run and I get no motion sickness process. Now I take that trigger, call it "trigger2", and give it the "appearifactivate.fpi" in the start script. I place a trigger zone in front of the player, set the main script to "plrinzoneactivateused.fpi" and put "trigger2" in the If Used field. When the player hits that trigger, it spawns the trigger with your second script and motion sickness did run.

What I have found out is that when the level starts and the player spawns, any script(s) that start at "state=0" will start and run through. That is why the motion sickness does not show- the script is already over by the time the player is in the level and can begin. That is why I like using the "etimer"- it allows the script to stop and wait for those x seconds to allow the player to spawn and not miss anything.

Unfortunately, my tests are in v1.17 and since I mod our own source, my results may not be the same results newer versions obtain. I can only tell you based on my source that your second script works if I use a trigger to activate the second trigger with your script, or I add the "etimer" pause to your second script and use that trigger only.

Quote: "BTW: what cool game is this, you're obviously working at???"


Cathy and I are working on an Egyptian development called Ancient Tombs- The Chest of Amenemhat. This game has been in the works for quite some time. Demo will be done at the end of this month.


Twitter: @NFoxMedia
Mr illusionest
15
Years of Service
User Offline
Joined: 5th Mar 2009
Location: Cairo , Egypt
Posted: 16th Aug 2012 21:34
Quote: "I still believe it is a processing and timing issue as I mentioned."

LOL how did I forgot it ?
I couldn't get FPSC to activate any postprocessing effect at the start of the game . however by adding a timer to delay the activation for 50 ms , it works fine .

"I am the night visitor when everyone is sleep , and when the last light fades"
The illusionest
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 16th Aug 2012 23:44
Quote: "LOL how did I forgot it ?
I couldn't get FPSC to activate any postprocessing effect at the start of the game . however by adding a timer to delay the activation for 50 ms , it works fine ."


Most are not aware that adding a simple "timer" can solve a lot of issues, particularly when you need thing(s) activated at the very start of a level.

"Etimer" is your friend.


Twitter: @NFoxMedia
The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 16th Aug 2012 23:49
@Blackfox: did you get my mail?

In case you find my grammar and spelling weird ---> native German speaker ^^
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 17th Aug 2012 00:01
Quote: "@Blackfox: did you get my mail? "


I did. Sorry, I was having lunch with my wife. Your message arrived just as we had left. I'm on it now


Twitter: @NFoxMedia
TheDesertEagle
13
Years of Service
User Offline
Joined: 7th Jul 2011
Location: Canada - Who knows where else???
Posted: 17th Aug 2012 01:42
Oh, Etimer is for entity timer is for everthing???
So, if i called a script and the script ran, and i called etimer
would the timer keep running even though other things are going on?

Joey-May god have mercy upon my enemies, because I won't.
Favourite Game-Call Of Duty MW2
The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 17th Aug 2012 02:10
Quote: "would the timer keep running even though other things are going on?"


Exactly - only the entity to which the script is attached can "see" the etimer so you can have multiple timers running.

In case you find my grammar and spelling weird ---> native German speaker ^^
mnemonic
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden
Posted: 24th Aug 2012 23:50
Quote: "actually the program acts strangely at many aspects . I tried to get a script to play a sound file with no use at all . the sound just won't play . the problem was that the script template was a copy of ammoglow.fpi (don't know how can this be a problem) . anyway I copied another script file and placed the SAME lines , and voila !"


I certainly agree with that! Most of the weird problems I somtimes encounter is vanished when I run FPSC cleaner thou. Make sure to run it twice (or more) to make sure that all DBO and BIN files are gone.

www.memblockgames.com

Login to post a reply

Server time is: 2024-11-23 23:02:39
Your offset time is: 2024-11-23 23:02:39