Jump to content

Problem with temporary colshape.


Arran

Recommended Posts

  
X, Y, Z = getElementPosition(getLocalPlayer()) 
col = createColCircle(X, Y, 150) 
outputDebugString(tostring(#getElementsWithinColShape(col, "player"))) 
  

Returns 0 when it should clearly return 1, the local player. But it does not until the player has moved, so I suppose we're going to have to add a timer on every temporary col shape check and hope they moved during that time?

Link to comment

i have tested it with a timer and when you move way the place where you created it outputs 1

test code:

addCommandHandler("col", 
function () 
X, Y, Z = getElementPosition(getLocalPlayer()) 
col = createColCircle(X, Y, 150) 
setTimer(check,1000,0) 
end) 
  
function check() 
outputDebugString(tostring(#getElementsWithinColShape(col, "player"))) 
end 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...