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 / Npc triggers light

Author
Message
Tanner 3000
16
Years of Service
User Offline
Joined: 20th Apr 2008
Location: Inside an AC130(Watch out!)
Posted: 1st Oct 2009 05:48
Can you give me a code or idea like the npc follows a waypoint to a computer or any model and the light activates with a sound?

Go to lostcontactgaming.com!!

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 1st Oct 2009 07:13
That's a tad complicated, actually... but mainly because characters don't have an "IfUsed" field in their properties.

What you can do to get around that is one of two things:
1) Have the character's script hard-coded to set it's target to the other entity. (Using the entity's name) Then activate it's target.

2) Have your character activate nearby entities with a certain value. (Not sure what this command is, but I know it was used in stock scripts... not coming to me off the top of my head) Then have your "destination object" at the end of the waypoints wait for an activation from the character. Then your object (which DOES have an IfUsed field) can activate the light.


After that, it's just a matter of having the light play the sound you're looking for.


The one and only,


Kravenwolf
15
Years of Service
User Offline
Joined: 14th Apr 2009
Location: Silent Hill
Posted: 1st Oct 2009 08:10 Edited at: 1st Oct 2009 08:10
3) You could set a timer to turn on the light and play a sound via trigger zone, and sncyronize it with the character's waypoint (assuming the player won't interfer with its path). When the timer reaches 0, the character reaches the end of its waypoint, and the light comes on and the sirens go off


Kravenwolf

Tanner 3000
16
Years of Service
User Offline
Joined: 20th Apr 2008
Location: Inside an AC130(Watch out!)
Posted: 2nd Oct 2009 00:33
Thanks!

Go to lostcontactgaming.com!!

Login to post a reply

Server time is: 2024-11-25 07:26:39
Your offset time is: 2024-11-25 07:26:39