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 / First attempt at scripting

Author
Message
flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 1st Dec 2006 03:32
Ok, this is my first try at real fpsc scripting. I tried making a simple script to start were if the player is on the trigger zone, the light is on, and if the player is out, the light goes out.... for some reason, it does not work.
any help?




"these shoes are 300 hundred dollars"-Shoes by Kelly http://smallgroup.be/
9h0s7
17
Years of Service
User Offline
Joined: 30th Nov 2006
Location:
Posted: 1st Dec 2006 03:40

I think it should be

could be wrong *shrugs*
filya
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location: USA
Posted: 1st Dec 2006 07:33
ya, ghost is right!

your state=2 should be :

state=2,plrwithinzone=0:state=3


You put a comma (,) between 2 or more conditions OR between 2 or more actions.

-- game dev is fun...but taking up too much time --
flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 1st Dec 2006 13:01
ohhhhhhh. i see, thanks a lo, ill try it when i get back from school


"these shoes are 300 hundred dollars"-Shoes by Kelly http://smallgroup.be/
BULLSHOCK 2
Retired Moderator
19
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 1st Dec 2006 14:41
actually all 3 states should be like that, havent tested it but this should work:





http://www.seqoiagames.com/seqoiacorp/
flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 1st Dec 2006 21:04
Hmm, bullshocks script does not work. thanks anyway though


"these shoes are 300 hundred dollars"-Shoes by Kelly http://smallgroup.be/
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 1st Dec 2006 21:57
All he did was correct your syntax.

A simpler way to do it may be to manipulate the ambiance.



Change the numbers to suite.

Best.

The forum provides a means to hide our true identity. Too bad we always screw up and let it be seen.

s4real
VIP Member
18
Years of Service
User Offline
Joined: 22nd Jul 2006
Location:
Posted: 1st Dec 2006 22:14 Edited at: 1st Dec 2006 22:30
Put this in the main ai on a light then make it dynamic this should work fine.

;Artificial Intelligence Script

;Header

desc = LIGHT ON AND OFF TRIGGER

;Triggers

:state=0:state=2
:state=1,plrwithinzone=1:state=2,lighton
:state=2,plrwithinzone=0:state=1,lightoff

;End of Script

Im a wizz at texturing toilets

Login to post a reply

Server time is: 2024-11-23 05:26:45
Your offset time is: 2024-11-23 05:26:45