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 / Auto light script help

Author
Message
Hoosier Sign Guy
15
Years of Service
User Offline
Joined: 8th Apr 2009
Location:
Posted: 26th Apr 2009 09:59
Here is my first attempt at scripting
[code;Artificial Intelligence Script

;Header

desc = Auto light on & off

;Triggers
:state=0:state=1
:state=0,plrwithinzone=1:activateallinzone=1,lighton=1,state=1
:state=1,plrdistfurther=100:activateallinzone=0,lightoff=0,state=0]

It is suppose to turn a light on or off based on player distance.

FPI Maker checks the code as ok but nothing happens.

Thanks for any help in advance


Sometimes you need "A Whack on the side of the Head"
to be more creative.
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 26th Apr 2009 15:13
...use FPIEditPad.


Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 26th Apr 2009 17:45
If it is supposed to turn the light on or off based on player distance and not based on whether a player is in a trigger zone, then you don't need the plrinzone commands. Do this instead:

:state=0,plrdistwithin=50:lighton
:state=0,plrdistfurther=51:lightoff

You don't need to change states as this is actually a pretty simple thing to accomplish.

Priest of the Church of Joe Wood
Hoosier Sign Guy
15
Years of Service
User Offline
Joined: 8th Apr 2009
Location:
Posted: 26th Apr 2009 19:29
Thanks guys for the help i guess i was trying to complicate the script i guess i need to use the K.I.S.S method for scripting (Keep It Simple Stupid)

Anythanks again
Howard



Sometimes you need "A Whack on the side of the Head"
to be more creative.

Login to post a reply

Server time is: 2024-11-25 00:25:15
Your offset time is: 2024-11-25 00:25:15