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 / Hurtzone with timer!

Author
Message
Payam
16
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 9th Aug 2010 11:20
Hi there


I have a very important question!


I want a trigger zone like hurtzone we have but it wont hurt us before the time we set (for example 3 second).

And

there is a way to stay in the trigger for always with pressing a key(for example f) and again by pressing the key again after the time it will hurt us.



Here you see why I want this.

I have a gasmask hud and the script for a trigger when we are in it we can press F and the gasmask hud will appear but I want another script to set in the same place to hurt us but with the timer.

Sorry for bad English

If you didn't understand I will describe more.

Have our guns was a mistake!!!

I am PaYaM
defiler
16
Years of Service
User Offline
Joined: 4th Apr 2009
Location: Canada
Posted: 9th Aug 2010 11:32
i understand what your asking, but im no coder though i could try, i would probably fail. so instead let me ask you if this is what you mean.


if gasmask = 1, hurt = 0

if gasmask = 0, hurt = 1

so if gasmask is on 1, then the hurt box will not hurt the player

and if gasmask is on 0, then it will hurt the player when he/she/it steps into it.


hope i cleared it up, i may try coding it but please, anyone else here that can code decently please try, as i may give up and not post what i have >.>

Limitless Box studios current project: Lost Contact
Payam
16
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 9th Aug 2010 15:05
Yes,You're right

look at this:

;Triggers

:plrwithinzone=1:state=1,plraddhealth=-1

if you add what you said to the upper script then it will be very good.

And about the timer : it's not very important.(I can ignore it)

Oh I changed the script about my gasmask now we can have it every where by pressing the key.

And now
if gasmask = 1 ,addhealth = 0
if gasmask = 0 ,addhealth = -1
is very good for it.

Or we can say:
if g(key=34) = 1 ,addhealth = 0
if g(key=34) = 0 ,addhealth = -1
(G=Gasmask)

the key is not important because I know the key numbers and I can change it.

I really thank to the person who can do this.
And I think this script can be very useful for others.

Have our guns was a mistake!!!

I am PaYaM
Payam
16
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 9th Aug 2010 17:18
Here I script something but there are 3 little problem with it:
1)I want to press the key once here we have to hold it.
2)The hurt sound repeats when you are in the trigger.
3)The eyehud come and do not go when you are in the trigger.

I know why these happen but I don't know how to fix them.

Here is the script


The result of the first problem is in the end: state=1
and other problems are plraddhealth=-1 and plraddhealth=1
there must be a way to not use the second one but disable the first one.


Anyway the script works and you can maybe use it as it is for free.

Have our guns was a mistake!!!

I am PaYaM

Login to post a reply

Server time is: 2025-06-01 10:49:39
Your offset time is: 2025-06-01 10:49:39