iPanda Posted December 19, 2014 Share Posted December 19, 2014 I would like to know how to connect two small collisions in one big collision, if one collision part hit to another collision part. Screenshots: What event should I use? What are the conditions? Warning! I need to get one element_data from two the Coliseum! I tried a simple test collisions, but does not work: create col: col1 = createColSphere(0,0,0) col2 = createColSphere(1,1,0) col1:setData('col',true) col2:setData('col',true) checking connect: addEventHandler("onClientColShapeHit",root,function(element) if source:getData('col') and element:getData('col') then outputChatBox('connect collisions') end end) Link to comment
MTA Team botder Posted December 19, 2014 MTA Team Share Posted December 19, 2014 Use isElementWithinColShape for both colshapes in an AND-statement (a and b) Link to comment
iPanda Posted December 19, 2014 Author Share Posted December 19, 2014 Give an example of my not working: if element:getData('col'):isWithinColShape(source) and source:isWithinColShape(element:getData('col')) then outputChatBox('col connect') end Link to comment
Castillo Posted December 19, 2014 Share Posted December 19, 2014 You can set one to be the parent of the other. setElementParent Link to comment
iPanda Posted December 20, 2014 Author Share Posted December 20, 2014 How can I check whether there is a one collision part hit to another collision part? Link to comment
Anubhav Posted December 20, 2014 Share Posted December 20, 2014 onColShapeHit and see if the thing which hit is a colshape. ( might work ) 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