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 / flashlight v3.1 problem

Author
Message
riccetts
14
Years of Service
User Offline
Joined: 14th Oct 2010
Location:
Posted: 12th Jun 2013 20:30
I imagine the flashlight script would work but I have to have a way to pick up the torch first before I could actually use it. The flashlight script will not allow the player to pick up the torch. Can somebody incorporate the pickup script into the flashlight script? (or show me how)
Thanks
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 12th Jun 2013 21:46
Quote: "I imagine the flashlight script would work but I have to have a way to pick up the torch first before I could actually use it. The flashlight script will not allow the player to pick up the torch. Can somebody incorporate the pickup script into the flashlight script? (or show me how)"


You can do it the following way:

1. Place your torch entity. Assign the pickup script to it and in the If Used field put the name of a trigger (ex: flashlight_control). The pickup script should contain something like the following:



Notice in the above pickup script I have the command activateifused=1 which will activate the item specified in the If Used field of the entity.

2. Place a trigger close by where you put the torch. It does not need to be over top of the torch, but somewhere close where the player would pick it up. It can even be behind a nearby wall. Assign the main script to the flashlight script you use and assign the following "appearifactivate.fpi" script to the trigger start script. Make sure the name of the trigger matches the name you assigned in the If Used field of the torch.



The player picks up the torch which will spawn the trigger that runs the flashlight script.


There's no problem that can't be solved without applying a little scripting.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 12th Jun 2013 21:53 Edited at: 12th Jun 2013 21:57
flashlight v3.1, is that the one with battery life?
In your scriptbanks folder look for "pickup.fpi" script. In the script you'll see a line "plrdistwithin=40:state=1,playertake"
Try and add that to your flashlight script.
I have flashlight v3, not v3.1.May be the same?

I just saw BlackFox's method and is a much better way of doing it.
Thanks BlackFox

Login to post a reply

Server time is: 2024-11-23 14:11:59
Your offset time is: 2024-11-23 14:11:59