Scripts / [SOLVED] hurtzone

Author
Message
nazco
4
Years of Service
User Offline
Joined: 8th Nov 2019
Location:
Posted: 13th Feb 2020 00:30
hi:
i need help with this:
when i made a hole..and use the trap door
i fell down and i have to wait so i can die in the water bellow ... takes a lot of time
i tested the hurt zone and i die if i move there and stay there
if i move then i can live
i put the hurt zone on the hole got hurt
but dont die
what i have to do ..so if the player
fell on the hole....it dies rapidly....
like is you get infront of an enemie..your life starts going down until
you die
can that can be done and how?
there is hurt zone script but i dont know what is says
i donot know coding
i will like to know what can be done
waiting your reply at your earliest convainance
NAZCO

The author of this post has marked a post as an answer.

Go to answer
PM
Earthling45
7
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 13th Feb 2020 00:59
Try if this is fast enough.

Attachments

Login to view attachments
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 14th Feb 2020 16:31
You will probably find this in the above script somewhere.

Just increase the value to higher than you players health for instant death. If I remember correctly the first value is the amount, the second the time it takes to pause between being hurt.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 14th Feb 2020 17:29
Moved to scripts
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
nazco
4
Years of Service
User Offline
Joined: 8th Nov 2019
Location:
Posted: 14th Feb 2020 17:53 Edited at: 15th Feb 2020 19:20
This post has been marked by the post author as the answer.
hi:
DVader:
did what you told
wrote:
Hurt Zone(-100,10)
run it and i had
runtime error 70060
did not worked sorry
I WILL CLOSE the POST
nazco
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 16th Feb 2020 21:35
nazco
Hey, what's up. Still looking for help?
So, what did you do with the script?
Did you use the suggestion; HurtPlayer(-1,1) ?

When you use a script, you must assign it to an entity (object) on the map.
Place a rock/ box or something small on the map in the location (very close) to
where you want the player to get hurt.

Assign that rock/ box to the script mentioned in the first response.
A> Just download it,
B> go to downloads, copy it and paste it into your scriptbank of Steam GG folder.
C> On the map, right click the rock/ box that you will use to trigger the script.
D> On that menu click properties...
E> under General set (Static Mode) = no
F> under AI System (main) click the right side of 'default.lua' box / menu down,
and find the script you just downloaded in the files, click it.
G> under Statistics set (Is Immobile) = yes
H> click Apply changes -- test it.

Bonus: line >11< of the script might work better if you change it to;
if math.abs(g_PlayerPosY - g_Entity[e]['y']) < 40 then
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 16th Feb 2020 21:47
Personally I use HurtPlayer( e, value ) where value is the amount to hurt by, seems to work ok.

Not sure why you need the 'e' but I assumed it was something to do with the red hud chevron thingies that show where the attack is coming from.
Been there, done that, got all the T-Shirts!
PM
smallg
Community Leader
18
Years of Service
Recently Online
Joined: 8th Dec 2005
Location:
Posted: 16th Feb 2020 22:02
Quote: "Not sure why you need the 'e' but I assumed it was something to do with the red hud chevron thingies that show where the attack is coming from."

yep
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 16th Feb 2020 22:26
Yeah, that might have something to do with the runtime error?
fersure there's no -1 entity
PM

Login to post a reply

Server time is: 2024-03-29 13:34:32
Your offset time is: 2024-03-29 13:34:32