simplezonebugthing.rbxl (93.1 KB)
(Set InSeperateQuerySpace to false and comment out the copy to query space line in order for it to work)
(Set InSeperateQuerySpace to false and comment out the copy to query space line in order for it to work)
Hi, fixed in package version 137, I was passing the wrong amount of parameters to copyToQuerySpace lol
Also, I gotta go sleep, so lmk if you have any more issues and Iâll answer in the morning
I can confirm it works now thank you for the help.
Theres no typechecking. Pls add it
but theres no hints.
This text will be hidden
Wdym? What version of SimpleZone r u using, it has hints for me (sorry for responding late, had to sleep)
Ohh I think I know why you donât have any hints, they recently auto-enabled the Incremental Typechecker beta feature which tends to break for more complex types, try turning it off
Added a seperate ZoneImpl
type for members of the Zone
class to shorten the autocomplete
Before:
Made it so Zone:Destroy()
automatically calls Zone:UnbindFromHeartbeat()
(this was removed a few versions ago, idk why but now itâs back :V)
.fromPartParallel()
Iâm having inconsistency on my zones using Zone:fromBoxes()
Some boxes do not trigger any events and only triggers closest to the center of all the boxes.
and using zone:fromBox() using only âOnEnterâ detection
sometimes it does not trigger it aswell. I am not sure what is causing this or have any reproduction steps. During my play test on my game sometimes its pretty consistent and sometimes not. I have simple system to where it checks if the player is in the current zone otherwise it kills them.
I binded a ListenTo(âPlayerâ, âEnteredâ) and just set the playerâs attribute to the current zone.
most likely the zone did not trigger from zone to zone. The zones do not overlap each other. I added spacing to each zones so when it enters between zone i made sure it exited first before entering a different zone.
like this:
I tried printing the playerâs zone attribute when they get killed to see if they in the zone. But sadly it printâs the old zone they were in not the current zone they are currently standing.
Hi, this is intended behaviour. For example, lets say i have 2 zone parts, A and B, and they are connected to eachother, and i construct a zone for both using Zone.fromParts()/Zone.fromBoxes()
, entering zone B from A will not trigger an entered/exited event. This is because zone parts within the same Zone wonât trigger those events
I honestly donât know if i can implement something like OnlyExitOnceExitedAll
from ZonePlus, as this is just a side product of how Iâm tracking items within the zone. Iâll let you know if the behaviour has changed though
For now Iâd try using Zone.fromPartParallel()
and setting QueryOptions.UpdateInterval
to something relatively high so you donât get lag
(Unless youâre describing a completely different issue? Let me know)
My bad I think i explained it badly. and the method i meant was
zone:fromPart() or zone:fromParts()
.
Zone A and Zone B are completely different zones they are constructed with 2 different zone object using zone:fromPart()
What Iâm trying to say on the first issue is when using zone:fromParts()
and pass these 3 base parts.
I expect it should trigger whenever the player enterâs one of these 3 parts but it does not. Hereâs an example:
the green circle the representation of the average center point of the 3 parts.
I avoided this issue by just using zone:fromPart()
instead but as you stated its more optimized to use fromParts()
if we have multiple parts that represents the same zone.
The second issue is now that I am using fromPart()
sometimes switching from different zone does not trigger the Entered Event even though they are completely different zone object.
They are constructed like this:
local zoneA = SimpleZone.fromPart(partA, params)
local zoneB = SimpleZone.fromPart(partB, params)
They are placed like this:
(This is just an example but i have more zones I use it for rooms and hallways so I can detect what room the player is or what hallway the player is currently at)
Hi, it would be very helpful if you could send the place where youâre testing these issues so I can see if I can reproduce them, thanks!
Hi, I canât replicate the issue in my game. Can you share the code youâre using to generate the zones and some things about your game you might think are causing the issue?
Is there no method to query and get all objects currently in a zone like ZonePlusâ :getParts()
?
Zone:Query(params)
//30charlimit//
BVH
module around a littleOk, that method is not autofilling with intellisense and has a type error when attempting to use it (Iâm using LessSimpleZone)
Hi, this is because in the module the Query
field is defined as nullable but it really isnât, Iâll change it in 155 :V Will let ya know