You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
addEventHandler("onClientColShapeHit", example, function(theElement, matchingDimension)
end)
In the above code you can if-check the matchingDimension if it's the same as set with setElementDimension. So the function partially works with it but it isn't ideal.
for example, what if you would like to avoid using colshape hit and colshape leave events?
I have a script where I check if a player is inside a colshape and if yes, then I slowly change his/her position towards the edges to drag the player out.
addEventHandler("onClientRender", root,
function()
ifisElementWithinColShape(localPlayer, colshape) then--code for dragging the player out ...endend)
I know I can use different approach for such things, I just noticed that when I change the player's dimension the code for the colshape still runs which is not ideal for me.
Describe the bug
Hello, the wiki says that
setElementDimension
works with colshapes but in reality it doesn't. (only partially)Steps to reproduce
use /showcol 1 in F8
then change your dimension to any dimension than 1, you'll be able to see the colshape.
Not only see it, but it will trigger onClientColShapeHit / onClientColShapeLeave / onClientElementColShapeHit / onClientElementColShapeLeave / onColShapeHit / onColShapeLeave / onElementColShapeHit / onElementColShapeLeave
In the above code you can if-check the
matchingDimension
if it's the same as set withsetElementDimension
. So the function partially works with it but it isn't ideal.for example, what if you would like to avoid using colshape hit and colshape leave events?
I have a script where I check if a player is inside a colshape and if yes, then I slowly change his/her position towards the edges to drag the player out.
I know I can use different approach for such things, I just noticed that when I change the player's dimension the code for the colshape still runs which is not ideal for me.
Another thing:
It would be cool, if these events onClientColShapeHit / onClientColShapeLeave / onClientElementColShapeHit / onClientElementColShapeLeave / onColShapeHit / onColShapeLeave / onElementColShapeHit / onElementColShapeLeave would have a
number
dimension and anumber
interior parameter to know which dimension and interior were triggered.Version
all version
Additional context
No response
Relevant log output
Security Policy
The text was updated successfully, but these errors were encountered: