Pseudo Zones For Non-Rectangular Zones

Pseudo zones?!.. Add this to the ever growing list of pseudo’s. So what is a pseudo zone? And why do we even need them? A pseudo zone is a zone that is dictated by lasers. They can help us get non-rectangular zones! You can also have some cool gimmicks like making a teleport into the zone not be detected!

Concept

The concept is that the zone will have a property that tracks if the player is in it or not. If the player is in the zone, the property will be 1, and if the player is not in the zone, then the property will be 0. So basically we use a counter with a target of 1 to do this. But this now all gets messed up if we teleport the player into the zone in question. So to remedy that, we put 2 lasers side by side (grid snap 2) to track the movement of the player.

Implementation

So how would we implement this? Well… First we would need the actual zone. So lets get that up!

Some warnings:

  • Make the lasers black to make them not be seen. You’ll also have to turn the path off. However, it’ll disappear while editing, so I recommend either keeping them red (that’s what I’ll do) or using deactivated, invisible barriers to mark them.

  • The physical endpoints of the laser aren’t the end. The box it shows while moving the laser is what will detect the player. The endpoints should be the edges that touch.

  • Of course, set the damage to 0. Do this before copying to make it easier for yourself.

image

So now we have a layer. We’re going to use a counter to implement this. Make all the lasers broadcast on “Laser Tripped”. Also set the scopes to player. Make a counter that is player scoped and increments on “Laser Tripped”. Make the default be 0 to start. If the player spawns inside at the beginning, make it be 1 to start. Now, when the counter is 1, it will go up to 2 when the player enters. When it is 2, we need it to go back to 0, so we reset it when it is 2. So make a wire repeater. Wire there counter to the wire repeater and back. The second wire should reset it. Make the counter edit a player-scoped number property named “In Zone”.

Now we have a zone that will be messed up by teleporters. If you don’t use teleporters in or out of the zone, then you’re finished! If not, then, do this:

This part is really hard to explain, so I’ll just list it out. To sort out AUO, do everything following, in the EXACT order I typed it in.

Make another box of lasers like the first one, but broadcasting on “Outside Laser”. Make a player scoped trigger that activates on “Outside Laser”, deactivates on “Laser Tripped”, and checks on “Outside Laser”. Make sure to input the checking channel 3rd, due to AUO. Make another player scoped trigger that activates on “Laser Tripped”, deactivates on “Outside Laser”, and checks on “Laser Tripped”.

The exactness is over! Make the first trigger trigger a checker that checks if “In Zone” is equal to 1. Wire the checker to the counter. Make it increment the counter if the check fails. Make the second trigger trigger a checker that checks if “In Zone” is equal to 0. Wire the checker to the counter so that if the check fails, then the counter increments. Here is the final product:

And there you have it! You might ask: Why do we even need these?

  • We can get non-rectangular zones.
  • This saves memory Edit: Actually, it doesn’t.
  • You can teleport the player inside without the system detecting it. This is useful for a spy class that can teleport into an enemy base. I first started thinking about this when I was thinking about SEEING IF A PLAYER’S HEALTH WAS LOWER THAN A SET VALUE, of all things. (It might actually work)
  • You can detect if a player enters through a specific side of the zone.
17 Likes

Okay, this helps me understand pseudo stuff even more, great job, @getrithekd !!

3 Likes

Thanks! Are you joking about the understanding, or does it actually help?

2 Likes

Great guide @getrithekd! i never n=knew what pseudo stuff was.

1 Like

No, I’m not joking, it actually helps!

2 Likes

this sounds like something i tried to do but ended up doing something simpler cuz i couldnt figure out what was bugged

1 Like

Wow, I never thought of doing this! Great idea, @getrithekd!

4 Likes

noice guide! :slight_smile: :+1:
this is a good alternative for zones if you hit the limit
as lasers have a 100 placement limit

5 Likes

I’m trying to use this for coordinates, but it’s being tricky.

I’m just gonna say what I have so far, and then if anyone has any ideas, they would be greatly appreciated.

Here it is:
To make a 3x2 coordinate system, we need a grid of lasers:
image ← now we need to track where the player is.

The problem with psuedo zoning is that lasers are bi-directional, meaning they can’t tell which direction someone is going in through them. We could remedy this by having two lasers right next to each other, but that seems inefficient for memory.
If we don’t do that, we need a checking system that sees “oh, this gim just entered the top and went left, where did they come from and where did they go?”
One of the first weaknesses we see is that the grid can’t tell both x and y coordinate from a gim entering the grid. The only thing we can do is track that they came in from the top, so y MUST be equal to 2. In other words, if y = 0, set y = 2. If y = 2, set y = 0. The same applies for the bottom and the x edges.

Let’s say that the gim is at (3, 2) now, after tripping the top laser.
image
The system only knows (x, 2). This is our first major roadblock. If the gim trips the x2-3 laser, the system won’t know whether our gim friend is going to (2, 2) or (3, 2). The only way to eliminate this is to have a laser on every other tile, like this.


This is already spiraling into inefficiency.

ok how do we do this

3 Likes

To detect movement without prior info about the location, you have to have 2 lasers. So basically, we have 2 lasers for each coordinate on the entry. Then, you can take a laser out per side by adding a default.

2 Likes

Yep.

Honestly, I feel like psuedo-zoned coordinates aren’t worth the trouble for the complexity.

1 Like

They save like 150 memory PER x and y coordinate.

2 Likes

Eh… not if you need a bunch of blocks and so many extra lasers per coord.

1 Like

Lasers are 10 memory. Zones are 200. They can both use PCPs, so it’s now way more efficient than the first 700 memory coordinate system.

2 Likes

What lasers are 10 memory???

They’re 75 for me…

1 Like

I thought I saw 10…

1 Like

can you send a screenshot?

I’m m on mobile, so I need to see later.

1 Like

I looked at the guide for the memory, and apparently, they’re 250 memory.

1 Like

That’s only if you have 1 laser. Once you get 2+, it said 75.
image

1 Like