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 Product Chat / [question] unsure of where to put this code.

Author
Message
scythe_reaver
FPSC Reloaded TGC Backer
14
Years of Service
User Offline
Joined: 14th Nov 2011
Location:
Posted: 6th Feb 2012 02:00
hey guys, its been a while. i've been looking for a flashlight script, and i found this one in the ocFPSCguide.



but....im not sure where it goes. can somebody clarify this for me?

http://www.shrinkpictures.com/processed/phprZ6E7O_c2AM.jpg
"I AM YOUR GOD OF DEATH"
BlackFox
FPSC Master
18
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 6th Feb 2012 05:43
You can assign to a trigger and put the script in the AI Main slot.

To make it more "realistic", you can do the following:

1. Place a flashlight entity where you want it, make it dynamic and assign a pickup script.
2. In the IfUsed field of the flashlight, enter the name of the trigger to run the flashlight script.
3. Edit the pickup script to ensure it has the "activateifused=1" in the action side once the player takes the flashlight. This will spawn the trigger.
4. Place a trigger right where the flashlight is. Edit the properties and set the Start to "appearifactivated.fpi", and the Main has the flashlight script.

When the player picks up the flashlight, the flashlight pickup script activates the trigger that will run the flashlight script.


Twitter: @NFoxMedia
scythe_reaver
FPSC Reloaded TGC Backer
14
Years of Service
User Offline
Joined: 14th Nov 2011
Location:
Posted: 6th Feb 2012 06:51 Edited at: 6th Feb 2012 06:51
the pickup1.fpi script looks like this. (sorry, i really have done absolutely nothing with scripting) where do i put the "activateifused=1"?



http://www.shrinkpictures.com/processed/phprZ6E7O_c2AM.jpg
"I AM YOUR GOD OF DEATH"
BlackFox
FPSC Master
18
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 6th Feb 2012 07:22 Edited at: 6th Feb 2012 07:23
On the ":state=10" line, like this:

:state=10,plrdistwithin=40:state=1,playertake,coloff,plrsound=audiobank\misc\ping.wav,activateifused=1,hudshow=itemprompt,hudfadeout=itemprompt

Perhaps a Mod could rename this thread to "How to use Flashlight Script" and move to the Script section?


Twitter: @NFoxMedia

Login to post a reply

Server time is: 2026-07-01 13:13:50
Your offset time is: 2026-07-01 13:13:50