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 / Script Didn't Work.

Author
Message
Edward
12
Years of Service
User Offline
Joined: 10th Aug 2012
Location: Earth, 17th Century.
Posted: 17th Nov 2012 13:52
Hi, i am a new guy to FPS Creator. I suck at scripting and i just used words from Nickydude's Book. But the script didnot work. Why?

[/code];Artificial Intelligence Script

;Header

desc = Flashbacks

;Triggers

:state=0,plrwithinzone=1,setposteffect=surreal:state=1
:state=1,plrwithinzone=0,setposteffect=none,state=2
:state=2,state=0

;End of Script [code]

Life is a Challenge.
Killj0y17
12
Years of Service
User Offline
Joined: 15th Sep 2012
Location: In a pineapple, under the sea
Posted: 17th Nov 2012 14:33
what is the effect you want to achieve?

BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 17th Nov 2012 14:41
Quote: "But the script didnot work. Why?"


Because the syntax is incorrect. The command "setposteffect" is an action, and therefore should be on the "right" side of the colon, not left side.

When scripting, script lines should follow any one of these formats:

:STATE,CONDITION(S):ACTION(S)

or

:STATE:ACTION(S)

or

:CONDITION(S):ACTION(S)

The key is knowing what are conditions and actions, then that will help to understand when to use a colon or comma.

In the case of your script, it should be:



Hope that helps.


There's no problem that can't be solved without applying a little scripting.
Killj0y17
12
Years of Service
User Offline
Joined: 15th Sep 2012
Location: In a pineapple, under the sea
Posted: 17th Nov 2012 14:47 Edited at: 17th Nov 2012 14:49
Explanation: when the player is in zone it will do the post effect surreal, and also it will do state 1, now state 1 states that if the player is not within the zone, the post effect will be none and it will do state 2, now what is state 2? it will once again do state 0, thus repeating the script....
just tryin' to help (correct me if I'm wrong)

Killj0y17
12
Years of Service
User Offline
Joined: 15th Sep 2012
Location: In a pineapple, under the sea
Posted: 17th Nov 2012 14:55 Edited at: 17th Nov 2012 14:56
next time, you may want to use FPI EditPad a really great program, especially for beginners,
Thread Link:
http://forum.thegamecreators.com/?m=forum_view&t=129738&b=23

Login to post a reply

Server time is: 2024-11-27 13:19:52
Your offset time is: 2024-11-27 13:19:52