pa3ck Posted August 29, 2014 Share Posted August 29, 2014 Hey. After spending a good few minutes trying to solve my problem, I found out that getElementsWithinColShape isn't working client side for some reason. It works perfectly fine on server side though... I guess it's a bug, isn't it? addCommandHandler ( "ttt", function ( ) local x, y, z = getElementPosition ( localPlayer ) local sphere = createColSphere ( x, y, z - 1, 2 ) local vehs = getElementsWithinColShape ( sphere ) outputChatBox ( tostring ( #vehs ) ) -- always 0 client side, but I get the correct number of elements server side. end) Link to comment
lcd12321 Posted August 29, 2014 Share Posted August 29, 2014 try to make elements on client side and see what's happened Link to comment
pa3ck Posted August 30, 2014 Author Share Posted August 30, 2014 Well, I can try it, but even if it works, I think it should recognize server side elements as well.. Link to comment
lcd12321 Posted August 30, 2014 Share Posted August 30, 2014 read on wiki description Link to comment
pa3ck Posted August 30, 2014 Author Share Posted August 30, 2014 All right, okay. So if I create the colshape it's not going to recognize the element until it moves... That's bad... Link to comment
Moderators IIYAMA Posted August 31, 2014 Moderators Share Posted August 31, 2014 Must be a bug, clientside should be must better in detecting colshapes then serverside. Serverside must live from streamed data from the clients. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now