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 / Trigger lights with distance

Author
Message
AndySuk
16
Years of Service
User Offline
Joined: 14th Sep 2008
Location:
Posted: 5th Sep 2009 18:22
Hi Folks

I am trying to set a series of lights in a corridor whihc come on when the player is close to them. I used trigger points successfully but then needed additional trigger points to switch off the light as the player moved away.

Following the ocfpscguide (or at least trying to!) I wrote this small script but don\'t understand why it doesn\'t work;



As far as I understand it the state of the dynamic light (the Start script of the light is "lightoff.fpi" and the Main script is as above) starts off as 0. The engine checks this and changes the state to 1. With the state as 1 then if the player is within 100 units the state changes to 2 and the light goes on. Whith the state at 2 if the player moves out of the 100 unit range then the state changes back to 1 and the light goes off.

...at least that's the theory but I've obviously errored out here.

If anyone could explain what I'm doing wrong then I'd appreciate it.

Thanks and regards

Andy

Andy S, Reading, Berks
shadowfire
15
Years of Service
User Offline
Joined: 24th Mar 2009
Location: England
Posted: 5th Sep 2009 21:28
you might notice that dynamic lights do that automatically.

when you walk away from them, you can't see them, but when you walk closer, you can see them. i had this and i'll think you'll find they do that with any dynamic light.

AndySuk
16
Years of Service
User Offline
Joined: 14th Sep 2008
Location:
Posted: 6th Sep 2009 20:43
Thanks for that. My lights seem to stay on - even when they're dynamic so don't really give me the effect that I'm after. That maybe because I'm using shorter distances though so suspect that I'll have to script it or use multiple trigger zones.

Thanks

A

Andy S, Reading, Berks

Login to post a reply

Server time is: 2024-11-25 06:50:50
Your offset time is: 2024-11-25 06:50:50