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 / Wasp v2 flashlight battery help

Author
Message
dustofdeath
14
Years of Service
User Offline
Joined: 7th Mar 2011
Location:
Posted: 15th Mar 2011 23:58


the key part works, but the battery part makes no sense, and the manual isnt helpful.

I tried various values to no avail - the current code seems to power the-flashlight for 20s and then turns off(there was supposed to be a kind of a light size dropping etc as power lowers).

battery = 1 should be correct (if 1 is on, 0 is off -manual didnt say).
setbattery=600 ... no idea... settign battery to 600 should mean that it lasts 600 sec if i set batterydecay=1 (or 12000 sec if its 20 - if the manual is right)
batterydecay= (1 point of energy per sec, so val 2 should mean 0.5 energy per sec etc).
Goodman84
18
Years of Service
User Offline
Joined: 23rd May 2007
Location:
Posted: 3rd Apr 2011 17:50
Wait what does this code go to? The Startup? Main?

hey
bobochobo
16
Years of Service
User Offline
Joined: 9th Jul 2008
Location: My house, in the middle of my street
Posted: 8th Apr 2011 13:18
I haven't got round to playing with the flashlight much yet. I'd presume that script goes as a trigger zone or an object.

As far as I understand it, the setbattery is your time, or energy.
Batterydecay is how long it takes to lose 1 ''energy''.
So, if setbattery=600 and batterydecay=20, it should take 12000 seconds to all of its power. Which is what you've already deduced.

From a short period of testing, it seems to me that the batterydecay is actually how long the light stays on for before turning off.

Where did you read that light level will drop while the battery loses power?

SgtBrown5
15
Years of Service
User Offline
Joined: 10th Mar 2010
Location:
Posted: 11th May 2011 01:01 Edited at: 11th May 2011 01:02
I sorry but I am super new to scripting and I don't even understand how to get just the flashlight part to work. It talks about "scan code for key" I dont get it. I just want to beable to turn on and off the flash light attached to a gun by pressing the F key.

Please help.

SgtBrown5
bobochobo
16
Years of Service
User Offline
Joined: 9th Jul 2008
Location: My house, in the middle of my street
Posted: 11th May 2011 10:30
Firstly (if you haven't already) read the scripting parts in the FPSC manual or atleast the WASP manual. You need to put:

;FLASHLIGHT
IsTorch=1
TorchKey=33
TorchRange=600
TorchRed=255
TorchGreen=255
TorchBlue=255

In the weapon's gunspec, found here:
FPS creator\Files\gamecore\guns\(weaponmakesname)\(weapon)

Just copy and paste it onto the bottom.
Then, put this into a dynamic entities main script:


After that, put said weapon into your game and pressing ''f'' should activate the flashlight.

SgtBrown5
15
Years of Service
User Offline
Joined: 10th Mar 2010
Location:
Posted: 13th May 2011 04:27
Thanks I got it to work, but I got one more question.

The light seems to only reflect off certain surfaces. I believe that it is just a bug with this, seeing as fpsc dosn't really have a flashlight.

But I am posting this just in case any one might know how to fix it.

SgtBrown5
bobochobo
16
Years of Service
User Offline
Joined: 9th Jul 2008
Location: My house, in the middle of my street
Posted: 14th May 2011 23:31
As far as I understand it, the WASP flashlight is just a light that moves with the player sometimes.

I think the reason the light is reflecting of some things is because they have a specular map. If you make everything a spec map and apply a shader to everything, the light should reflect of everything.

There are tutorials on how to make spec maps and on how to apply them on these forums and on youtube.

All browsers should come with compulsory spell checks.

Login to post a reply

Server time is: 2025-06-07 12:11:46
Your offset time is: 2025-06-07 12:11:46