Author Topic: Activating and deactivating zone to kill people  (Read 4739 times)

How can I do a Zone that when activated (externally, from a button) kills people that enter on it, and when you deactivate it, it stops killing people?

[0] onActivate -> NAMED_BRICK -> setZoneActive
[1] onActivate -> NAMED_BRICK -> setZoneUnctive
[2] onActivate -> Self -> ToggleEventEnabled [0 1]

[0] onActivate -> NAMED_BRICK -> setZoneActive
[1] onActivate -> NAMED_BRICK -> setZoneUnctive
[2] onActivate -> Self -> ToggleEventEnabled [0 1]


Actually use this

Thanks, should I add an onplayertouch > player > kill event in the zone?

Thanks, should I add an onplayertouch > player > kill event in the zone?
Playertouch won't work, use onInZone > Player > Kill

Playertouch won't work, use onInZone > Player > Kill
It wont let me set player as option

Since I cant edit, this wont work as expected, If the guy is already in the zone it wont kill him

if you create a zone, anything inside of it will trigger onenterzone
so you could just create a zone and then remove it

The event is called onPlayerEnterZone...


Since I cant edit, this wont work as expected, If the guy is already in the zone it wont kill him
You'll have to re-create the zone for it to capture players that are already in it again.

Install VCE, then make it so that it's
onInZone -> self -> VCE_ifValue 1 =! 2
onVraiableTrue -> Player - > Kill

there's an oninzone? I thought there was only entering and leaving

but yes, if you make a zone, anybody entering it will trigger onenterzone, not just at the borders, but in the middle of it too

Easy
Instead of making the zone active or unactive, make a zone and then delete it.
Because the zone didn't exist everyone in the zone enters it.

On button brick:
  • On Activate > Named Brick > SetZone ...
  • [60] On Activate > Named Brick > SetZone NONE


    On Zone Brick:
    OnPlayerEnterZone > Player > Kill



    If you have multiple zone bricks with different sizes, just use Relays to set the zones.

Install VCE, then make it so that it's
onInZone -> self -> VCE_ifValue 1 =! 2
onVraiableTrue -> Player - > Kill
What should I input for the button?
Easy
Instead of making the zone active or unactive, make a zone and then delete it.
Because the zone didn't exist everyone in the zone enters it.

On button brick:
  • On Activate > Named Brick > SetZone ...
  • [60] On Activate > Named Brick > SetZone NONE


    On Zone Brick:
    OnPlayerEnterZone > Player > Kill



    If you have multiple zone bricks with different sizes, just use Relays to set the zones.
Only works when player enters on zone, not when he's already on it