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 / Gas Mask Script

Author
Message
Brunopark09
14
Years of Service
User Offline
Joined: 7th Jul 2010
Location: Santiago de Chile
Posted: 13th Jul 2010 23:20
Hi

Look , I have Gas Mask Hud and the script to make it work

(here the script)



But i want to make the player gets hurt when isn't using the gas mask simulating a room with toxic gas, mean,you're using the gas mask and you are ok, but when you aren't your health starts to decrease,can someone help me to do it?

Pd: sorry for my bad english, i'm chilean

(Here is the download of the hud and the script)

-grinsh-

Attachments

Login to view attachments
Gencheff
14
Years of Service
User Offline
Joined: 12th Jun 2010
Location: UK by way of USSR
Posted: 13th Jul 2010 23:31
Place a trigger zone in a place where the player will surely step in.Like in a door frame.

add the script to the triggerzone main.Or if you dont want a trigger zone use a dynamic light .

try to make it so that if a player is in the zone (plrdistwithin=x) and the state is not equal to a state when the mask is on (or in your case state=1) you start a timer (timerstart) and then just add conditions with where the player loses health , like so :timergreater=1000:plrsubhealth=20
Brunopark09
14
Years of Service
User Offline
Joined: 7th Jul 2010
Location: Santiago de Chile
Posted: 13th Jul 2010 23:44
And if i use a hurt zone by activation? mean, i start loosing health, then i hit the "f" key to deactivate the hurt zone, also i put the trigger zone of the gasmask, that works with the "f" key, so, i loose helath, then i "use the gasmask" and stop loosing it

can it be possible?

-grinsh-
Brunopark09
14
Years of Service
User Offline
Joined: 7th Jul 2010
Location: Santiago de Chile
Posted: 14th Jul 2010 09:22
Ok, i've try what you tell me but i can't make it work! or nothing happens or just i get hurt and can't stop loosing health using the mask already

My brain is gonna explode

-grinsh-
SAK
15
Years of Service
User Offline
Joined: 16th Nov 2009
Location:
Posted: 14th Jul 2010 09:36
Brunopark09,i know from where you get this picture.Its from one game,her name start whit P.

Studio
Brunopark09
14
Years of Service
User Offline
Joined: 7th Jul 2010
Location: Santiago de Chile
Posted: 14th Jul 2010 09:39
Actually I downloaded it from FPS Files lol

-grinsh-
ctm
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 14th Jul 2010 14:42 Edited at: 14th Jul 2010 15:36
To be able to use the mask everywhere it would be best to implement the lines in the setuplevel.fpi.

A more easy way is to make the Hurt Zone as large as your room is and use a combination of your gasmask script and the plrhurtinzone.fpi

Could look like this (not tested but should work):



You could use a global variable too.
Just set it to 1 when plr is using the mask and set it to 0 when he doesnt.

The gasmask script:



The new plrhurtinzone script:

Brunopark09
14
Years of Service
User Offline
Joined: 7th Jul 2010
Location: Santiago de Chile
Posted: 14th Jul 2010 22:30
Thanks ctm! it works

-grinsh-
ctm
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 15th Jul 2010 13:41
You're welcome
Brunopark09
14
Years of Service
User Offline
Joined: 7th Jul 2010
Location: Santiago de Chile
Posted: 16th Jul 2010 10:48
Can a mod lock this thread? my problem is resolved already

-grinsh-

Login to post a reply

Server time is: 2024-11-24 21:43:47
Your offset time is: 2024-11-24 21:43:47