Electric fence
#1

This is possible?
Like a electric fence, if you touch it it kills you.
Everyone please post there ways if you know of any, how this idea will work.
So far all i know is if the player is in a certain position he dies, that position is infront of the fence.
But that is a alot of work if it's a big fence.
Reply
#2

You're best bet would be to run a timer that checks every second if anyone in the server is at the position of an electric fence, it's going to put some stress on the server, and gives a 1 second window during which people could get over, but it'd doable.
Reply
#3

Maybe you can try using IsPlayerInRangeOfPoint . Just Wiki it, I dunno if that could work as it checks if the player is in the range of a sphere...
Reply
#4

I guess you will need to use IsPlayerInArea. Just make a small part around the the fence an area. Do this for every side of the fence and then it should work more or less well..
Reply
#5

Yeah use something like

IsPlayerInPoint or w/e and once its near the fence appy a animation similar to someone getting electrocuted.

That would be pretty neat
Reply
#6

Quote:
Originally Posted by BIGBOY
Yeah use something like

IsPlayerInPoint or w/e and once its near the fence appy a animation similar to someone getting electrocuted.

That would be pretty neat
Yea the electrocution anim would be the best if you find it
Reply
#7

I would prefer IsPlayerInRangeOfPoint function and a Timer to check it of-course
Reply
#8

Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
I would prefer IsPlayerInRangeOfPoint function and a Timer to check it of-course
but if it's a long fence, you got to make alot of IsPlayerInRangeOfPoint, because it measures in a range, so if you would be far away from it you would get executed anyways...

I'm not sure if you could only check it for the x or y ...

Reply
#9

Quote:
Originally Posted by dirkblok
Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
I would prefer IsPlayerInRangeOfPoint function and a Timer to check it of-course
but if it's a long fence, you got to make alot of IsPlayerInRangeOfPoint, because it measures in a range, so if you would be far away from it you would get executed anyways...

I'm not sure if you could only check it for the x or y ...

You can increase the radius of the range
Reply
#10

Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
Quote:
Originally Posted by dirkblok
Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
I would prefer IsPlayerInRangeOfPoint function and a Timer to check it of-course
but if it's a long fence, you got to make alot of IsPlayerInRangeOfPoint, because it measures in a range, so if you would be far away from it you would get executed anyways...

I'm not sure if you could only check it for the x or y ...

You can increase the radius of the range
I know that, but remember it's a radius
And a radius is round, and the gate is straight, so if you aren't near the fence, but still in the radius....

Reply
#11

Quote:
Originally Posted by dirkblok
Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
Quote:
Originally Posted by dirkblok
Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
I would prefer IsPlayerInRangeOfPoint function and a Timer to check it of-course
but if it's a long fence, you got to make alot of IsPlayerInRangeOfPoint, because it measures in a range, so if you would be far away from it you would get executed anyways...

I'm not sure if you could only check it for the x or y ...

You can increase the radius of the range
I know that, but remember it's a radius
And a radius is round, and the gate is straight, so if you aren't near the fence, but still in the radius....

Hmm.. Maybe yes
Reply
#12

Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
Quote:
Originally Posted by dirkblok
Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
Quote:
Originally Posted by dirkblok
Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
I would prefer IsPlayerInRangeOfPoint function and a Timer to check it of-course
but if it's a long fence, you got to make alot of IsPlayerInRangeOfPoint, because it measures in a range, so if you would be far away from it you would get executed anyways...

I'm not sure if you could only check it for the x or y ...

You can increase the radius of the range
I know that, but remember it's a radius
And a radius is round, and the gate is straight, so if you aren't near the fence, but still in the radius....

Hmm.. Maybe yes
So... that's why you have to create several small IsPlayerInRangeOfPoint at different places to use it
Maybe you could make something that checks someones x or y as, if you placed the object without any rotation.
Reply
#13

Quote:
Originally Posted by dirkblok
Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
Quote:
Originally Posted by dirkblok
Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
Quote:
Originally Posted by dirkblok
Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
I would prefer IsPlayerInRangeOfPoint function and a Timer to check it of-course
but if it's a long fence, you got to make alot of IsPlayerInRangeOfPoint, because it measures in a range, so if you would be far away from it you would get executed anyways...

I'm not sure if you could only check it for the x or y ...

You can increase the radius of the range
I know that, but remember it's a radius
And a radius is round, and the gate is straight, so if you aren't near the fence, but still in the radius....

Hmm.. Maybe yes
So... that's why you have to create several small IsPlayerInRangeOfPoint at different places to use it
Maybe you could make something that checks someones x or y as, if you placed the object without any rotation.
Using many IsPlayerInRangeOfPoint will be a waste of time
Reply
#14

Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
Quote:
Originally Posted by dirkblok
Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
Quote:
Originally Posted by dirkblok
Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
Quote:
Originally Posted by dirkblok
Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
I would prefer IsPlayerInRangeOfPoint function and a Timer to check it of-course
but if it's a long fence, you got to make alot of IsPlayerInRangeOfPoint, because it measures in a range, so if you would be far away from it you would get executed anyways...

I'm not sure if you could only check it for the x or y ...

You can increase the radius of the range
I know that, but remember it's a radius
And a radius is round, and the gate is straight, so if you aren't near the fence, but still in the radius....

Hmm.. Maybe yes
So... that's why you have to create several small IsPlayerInRangeOfPoint at different places to use it
Maybe you could make something that checks someones x or y as, if you placed the object without any rotation.
Using many IsPlayerInRangeOfPoint will be a waste of time
I know

But you could try with a SetTimer, and GetPlayerPos. And then if the gate is placed with 0 rotation or 90 rotation, you could check if the player is on, or near the x or y of the object
Reply
#15

Quote:
Originally Posted by dirkblok
Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
Quote:
Originally Posted by dirkblok
Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
Quote:
Originally Posted by dirkblok
Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
Quote:
Originally Posted by dirkblok
Quote:
Originally Posted by ►Peter Corneile [ideal-host.co.uk
◄ ]
I would prefer IsPlayerInRangeOfPoint function and a Timer to check it of-course
but if it's a long fence, you got to make alot of IsPlayerInRangeOfPoint, because it measures in a range, so if you would be far away from it you would get executed anyways...

I'm not sure if you could only check it for the x or y ...

You can increase the radius of the range
I know that, but remember it's a radius
And a radius is round, and the gate is straight, so if you aren't near the fence, but still in the radius....

Hmm.. Maybe yes
So... that's why you have to create several small IsPlayerInRangeOfPoint at different places to use it
Maybe you could make something that checks someones x or y as, if you placed the object without any rotation.
Using many IsPlayerInRangeOfPoint will be a waste of time
I know

But you could try with a SetTimer, and GetPlayerPos. And then if the gate is placed with 0 rotation or 90 rotation, you could check if the player is on, or near the x or y of the object
Yup
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)