Scripts / deathzone.lua however there is a glitch,

Author
Message
Meows
13
Years of Service
User Offline
Joined: 12th Oct 2011
Location: Totally over the Rainbow
Posted: 14th Dec 2016 12:15
I made deathzone.lua and it works great, However I wanted to initially use it in a huge cavern,


Where the player can only exit up this ramp.



The problem is I was not aware that the Triggers work in huge squares. I put the trigger on the floor and went up a ladder.
Then the instant I passed 50 feet OVER the trigger I was killed!

Attachments

Login to view attachments
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 14th Dec 2016 15:22
Zones have no height, they work at all heights so you will need to add an extra if statement to check the player is near the same height as the zone if you want to be able to walk in it but above it.
On my phone but this should work (remember to add an extra end to your script after the hurtplayer code too)

if g_PlayerPosY < g_Entity[e]['y'] + 150 then
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Meows
13
Years of Service
User Offline
Joined: 12th Oct 2011
Location: Totally over the Rainbow
Posted: 16th Dec 2016 12:38
WOW that is awesome! I added to a test a set of stairs, and if you run up the stairs your live. but go under the stairs you die!
Many thanks sire!

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-12-23 04:01:03
Your offset time is: 2024-12-23 04:01:03