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 / Disappearing Hurtzones

Author
Message
Susysyay
16
Years of Service
User Offline
Joined: 2nd Nov 2009
Location: Chicago
Posted: 31st Dec 2010 16:04
Hello
I need some scripting help. I need to make a hurtzone disappear when the player steps into a seperate trigger zone. Is this even possible? I don't have any idea how to do this.

I know it sounds like I'm requesting this, but I figure this is something real easy, but since I have minimal scripting capabilities, any help would be much appreciated. And I hope the mods don't shoot me down cause of me asking for some help.

Cheers
Susysyay
Winner of the X10 Revival Competition

-Winner of the X10 Revival Competition, Susysyay
Gencheff
16
Years of Service
User Offline
Joined: 12th Jun 2010
Location: UK by way of USSR
Posted: 31st Dec 2010 16:15 Edited at: 31st Dec 2010 16:15
It's far from real easy...

I won't write the script , but I show you the light.

What you need to understand first:

Hurtzones are simple triggerzones with a main script set which reduces the players health.The script in a hurtzone is like this - :state=0:plraddhealth=-1

What you need to do :

You need to use a global variable to check if the player has stepped in the zone and correspond with the hurtzone.

How? Use a custom script for your triggerzone.

Has to contain :
1.Line to check if the player is withinzone and if so to increment a global variable with a number of 1

Then you need a custom hurtzone script.

Hast to contain:
1.Line checking if the variable is equal to 0.If so then to hurt the player if he is in the zone (something like :state=0,plrwithinzone=1,varequal=0:plraddhealth=-1)

I can think of a few other ways,but this should help you.

Good luck Winner of the X10 Revival Competition.


PC Specs:Windows 7 Ultimate 64-bit,Intel Core i7 960 @ 3.20GHz,NVIDIA GeForce GTX 480,12GB RAM,2x Western Digital 997GB HDD
Susysyay
16
Years of Service
User Offline
Joined: 2nd Nov 2009
Location: Chicago
Posted: 31st Dec 2010 16:26
Yea, my idea which I was aiming for was to make a trigger zone which could activate a seperate script, something like destroyandactivate.fpi, which could activate a script in the hurtzone which would remove itself. But I could see a checking system be more practical.

-Winner of the X10 Revival Competition, Susysyay

Login to post a reply

Server time is: 2026-07-22 00:44:33
Your offset time is: 2026-07-22 00:44:33