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 / Player trigger on start point / start location spawn TRIGGERING

Author
Message
Dida
14
Years of Service
User Offline
Joined: 12th Mar 2010
Location:
Posted: 8th May 2013 16:37
hey guys i want to ask if i can trigger something at starting location of the player? putting a trigger and spawning the player there wont work any other ideas?
FHANKS!

Your signature has been erased by a mod because it contained offensive text. Why? WHYYYYY !
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 8th May 2013 17:35
Hi Dida
Take a look at BlackFox's response in this post. http://forum.thegamecreators.com/?m=forum_view&t=205356&b=23
It has to do with timing. You may need a bit of a delay at the start.
best
Dida
14
Years of Service
User Offline
Joined: 12th Mar 2010
Location:
Posted: 8th May 2013 21:12
Thanks for the replay.

so yeah i tried this script


But it dosent really work i done it to a trigger with the effect it does nothing any ideas?

Your signature has been erased by a mod because it contained offensive text. Why? WHYYYYY !
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 8th May 2013 21:53 Edited at: 8th May 2013 21:54
Just by chance, make sure your postprocessing is set to 1
[postprocessing=1] in your "setup.ini" file.
Changes only take place in setup.ini with FPSC closed.

Also your effect(rain) does not turn off, even when leaving your zone. So you really don't need states 4&5. If you do want it turned off how about, :state=4,plrwithinzone=0:setposteffect=none,state=2
best ncmako
Dida
14
Years of Service
User Offline
Joined: 12th Mar 2010
Location:
Posted: 8th May 2013 22:29
Yes, my postproecessing in "setup.ini" is 1 but still ain't working :/

Your signature has been erased by a mod because it contained offensive text. Why? WHYYYYY !
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 8th May 2013 22:53
Quote: "still ain't working"


What's not working? The rain effect? Can you paint a picture or describe what you are doing exactly (step by step if possible)?

The script you attempted to use is from the default post effects for rain. It does work, but you also need to know how the engine works and why things don't work. The script works fine for me, so I am a bit lost as to what or why it is not working for you.


There's no problem that can't be solved without applying a little scripting.
Dida
14
Years of Service
User Offline
Joined: 12th Mar 2010
Location:
Posted: 8th May 2013 22:59 Edited at: 8th May 2013 23:01
i got this effect called hue.fx it's a effect i got from Post Processing Pack - Camera Lens Effects i changed the :state=3:setposteffect=rain,state=4 to :state=3:setposteffect=hue,state=4

but nothing is showing up

I am taking the script and applying it to a triggerzone so when the brah player is spawning the effect will come in and be there

Your signature has been erased by a mod because it contained offensive text. Why? WHYYYYY !
Anubis
12
Years of Service
User Offline
Joined: 6th Nov 2012
Location: Netherlands
Posted: 8th May 2013 23:07 Edited at: 8th May 2013 23:08


change to


notice : and , after etimerstart

it won't leave state 0 the way it is now, if im not mistaken.

Grts
Anubis

-+- There are only 10 types of people in the world. Those who understand binary, and those who don't -+-

[Chipset:X58 CPU:i7.950.64 GPU:HD5970 RAM:12GB DDR3 WIN:7.x64 PRO FPSC:1.20.10]
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 8th May 2013 23:19
Quote: "it won't leave state 0 the way it is now, if im not mistaken."


Good catch!!


There's no problem that can't be solved without applying a little scripting.
Dida
14
Years of Service
User Offline
Joined: 12th Mar 2010
Location:
Posted: 8th May 2013 23:33 Edited at: 9th May 2013 00:15
no work

Your signature has been erased by a mod because it contained offensive text. Why? WHYYYYY !
Dida
14
Years of Service
User Offline
Joined: 12th Mar 2010
Location:
Posted: 9th May 2013 00:01
no my bad it no work
i play a video at the start and the effect wont work i dont know if that have to do with antyhing but when i press spacebar (to skip video) it works, when i let the video be played and it gets back to the game it no work

Your signature has been erased by a mod because it contained offensive text. Why? WHYYYYY !
Dida
14
Years of Service
User Offline
Joined: 12th Mar 2010
Location:
Posted: 9th May 2013 00:16
this is very wierd oO

Your signature has been erased by a mod because it contained offensive text. Why? WHYYYYY !
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 9th May 2013 16:51 Edited at: 9th May 2013 16:56
Hi Dida
Good catch by Anubis. I didn't see that one.
But I'm alittle lost?
Quote: "i got this effect called hue.fx "
but your script calls for the rain effect. I think you need to describe exactly what your doing/trying to do.

Edit: ok I see where you said you change it to "hue.fx" but it would help if you still showed us what you have.
Dida
14
Years of Service
User Offline
Joined: 12th Mar 2010
Location:
Posted: 9th May 2013 18:52
so this is my script right it works but whenever i put a story trigger in the game it wont work i want to play a text which before the game when i play both it no work if i remove the story it will work



Your signature has been erased by a mod because it contained offensive text. Why? WHYYYYY !
Anubis
12
Years of Service
User Offline
Joined: 6th Nov 2012
Location: Netherlands
Posted: 10th May 2013 10:47 Edited at: 10th May 2013 10:48
So actually what you are saying is that this script works fine. Unless you place another trigger (story) in your game.. than THIS script stops working.
We need at least see the other script, cause somehow thats the one that messes this one up.

btw.. the last 3 lines of your code:


Does not work.. every time your script comes at state 4, it goes to state 3 without thinking, it will not check for plrwithinzone.. Since :state=4:state=3 doesnt have a condition. Its being processed immediately. (ncmako already posted this in his second post!)

Grts
Anubis

-+- There are only 10 types of people in the world. Those who understand binary, and those who don't -+-

[Chipset:X58 CPU:i7.950.64 GPU:HD5970 RAM:12GB DDR3 WIN:7.x64 PRO FPSC:1.20.10]
Dida
14
Years of Service
User Offline
Joined: 12th Mar 2010
Location:
Posted: 12th May 2013 18:33
Yes anubis execlty.

What you want to see?
the other script is a story zone

What should i do please help

Your signature has been erased by a mod because it contained offensive text. Why? WHYYYYY !
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 12th May 2013 19:24
hmmm maybe we should combinate the both scripts:
use this instead of the storyzone.fpi of the storyzone(main)


Corno_1


Dida
14
Years of Service
User Offline
Joined: 12th Mar 2010
Location:
Posted: 12th May 2013 23:40 Edited at: 12th May 2013 23:48
still no work :/

if i press Space to skip the movie it works
if i leave the movie played it wont work

EDIT: it no work if i only put in story zone too with your script attach

Your signature has been erased by a mod because it contained offensive text. Why? WHYYYYY !
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 13th May 2013 01:41
@ Dida
There does seem to be a problem when using both "story" & a "trigger" over lapping and playing a video.
I do have a work around. Just use a single trigger, apply this to its "Main" script

If you look at the script you'll see it uses the video path and "playfullvideo". This seems to force the video to play first before going to the effect. Try it and let us know.
best ncmako
Dida
14
Years of Service
User Offline
Joined: 12th Mar 2010
Location:
Posted: 13th May 2013 17:19 Edited at: 13th May 2013 17:21
ok i checked again and both Corno_1 and ncmako scripts seems to work.

however both scripts when i do them the ENTITY LOGIC goes up very high and its difficult to play the game :/

any ideas?

EDIT: ncmako when i try your script the ENTITY logic goes up very high and crashes my game :/

Your signature has been erased by a mod because it contained offensive text. Why? WHYYYYY !
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 13th May 2013 21:24
Hi Dida
Sorry about that, it was only the partial script I posted.
Yeah, I had "entity logic" go thru the roof too with that one.
Here it is cleaned up.
note: without the timer (1/10 sec) in the script I also had problems getting the postprocess to run?
Here's a another with "rain" only in the zone(resets).
Tested, works. My "entity logic" stayed low with these.
best luck
Dida
14
Years of Service
User Offline
Joined: 12th Mar 2010
Location:
Posted: 13th May 2013 22:56 Edited at: 14th May 2013 00:30
thanks ncmako! works perfect now!

EDIT: So i dont open a other topic, is there a way to make the effect display for 'x' amount of time? like 5 seconds

Your signature has been erased by a mod because it contained offensive text. Why? WHYYYYY !
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 14th May 2013 20:25
@ Dida
Sure you can. Just think about it. Throw in an "etimerstart" after the effect has started. Then after 5sec's kill it with "setposteffect=none". Look at your original scripts how the timer was used, then apply it to the effect.. You can do it, just try it
Dida
14
Years of Service
User Offline
Joined: 12th Mar 2010
Location:
Posted: 15th May 2013 14:07
:state=0:state=1

:state=1,plrwithinzone=1,state=2
:state=2 setposteffect=rain,etimerstart,state=2
:state=2,etimergreater=100:state=3
:state=3:setposteffect=none,state=4
:state=4:none

i dunno

Your signature has been erased by a mod because it contained offensive text. Why? WHYYYYY !
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 15th May 2013 17:24
You have a couple of syntax errors and your "etimergreater=100" is in milliseconds so it will not play the rain for very long set at 100.

This is how you can have the effect on for 5 seconds.



The "state=3" line is where you would insert the timer for 5 seconds (etimer is in milliseconds- 5000ms equals 5 seconds).

I would also suggest if you have not done so, grab a copy of the Script Syntax found here. It outlines all the conditions/actions and may help you.


There's no problem that can't be solved without applying a little scripting.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 15th May 2013 18:58
@ BlackFox
I don't know if you read thru this thread yet? But can you think of a reason why an effect wont play right after a video unless you give it a slight delay?

Without that delay I couldn't get the effect to run. As soon as I did (even just 100ms) it works? I 'm sure this is not a bug, but just how the engine handles things.
confused & just wondering ncmako
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 15th May 2013 20:56
Quote: "Without that delay I couldn't get the effect to run. As soon as I did (even just 100ms) it works? I 'm sure this is not a bug, but just how the engine handles things."


Exactly right. It is how the engine processes the commands in order to play each one called. There are some that actually need to be in front of others to work, otherwise they don't work and then people think it is a bug. Even commands we have created for ourselves have to be in a certain order with other commands to work effectively. In this case, the script has already started and by the time the "video" command is called, the script has skipped the call for the effect and ended because it is playing the video. By adding the delay, it allows the engine to activate the command called (video), give a short inhale and say "okay, we have another". The same theory to why we put periods at the end of a sentence (so we can inhale a breath and continue).

Make sense?


There's no problem that can't be solved without applying a little scripting.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 15th May 2013 21:22
@ BlackFox
Thank you, makes perfect sense.
As soon as you said "have to be in a certain order" I remembered this has come up before from time to time.
Thanks again
Dida
14
Years of Service
User Offline
Joined: 12th Mar 2010
Location:
Posted: 17th May 2013 00:40
thanks brahs,

so if i need to add a sound when the effect plays i do something like this;



or



thanks.

Your signature has been erased by a mod because it contained offensive text. Why? WHYYYYY !
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 17th May 2013 01:08
Don't forget to include the extension of the sound file in your script. Either "audiobank/lisa/voice/ann.wav" or "audiobank/lisa/voice/ann.ogg", etc.


There's no problem that can't be solved without applying a little scripting.
Dida
14
Years of Service
User Offline
Joined: 12th Mar 2010
Location:
Posted: 22nd May 2013 19:19
Thanks for the help!

im willing to ask one more thing so yeah i got this script



how can i make it so it can play the same ambiance i play in the game? so like yo know im puttin a soundzoneloop in my game and i want the video to play that sound too.
Any ideas?! thanks

Your signature has been erased by a mod because it contained offensive text. Why? WHYYYYY !

Login to post a reply

Server time is: 2024-11-23 14:30:22
Your offset time is: 2024-11-23 14:30:22