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 / A weapon/health script

Author
Message
Dark Samus
16
Years of Service
User Offline
Joined: 1st Dec 2007
Location: Phaaze
Posted: 2nd Dec 2007 05:02
Ok so I'm not a total noob. I read Nickydude's wonderful guide. Now I need to know if I can make a script where if I use a weapon, it will decrease my health if I use it (I dont mean like you shoot close to yourself you lose health). If so, how do I do it?
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 2nd Dec 2007 10:49 Edited at: 2nd Dec 2007 10:57
An easy way to do this would be to trigger it on the reload.
If they press the 'R' key then take the health off by adding a negative number.

:state=1,scancodekeypressed=19:plraddhealth=-50

Of course, that does nothing if they let it automatically reload.

Another way would be to start a timer when they equip the weapon, and take health off until it stops or they die.
Stop the timer when they equip another weapon or hit '0'.
Just give them another weapon and this one to start with.
That way they have to hit '2' to equip it, and that triggers the timer.
Hitting '1' or '0' would stop it.
The timer delays the loss of health so that it is not instant death.
An activated state turns it on and off.

Don't forget to visit Conjured Entertainment

Login to post a reply

Server time is: 2024-11-24 01:56:20
Your offset time is: 2024-11-24 01:56:20