iPanda Posted December 19, 2014 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)
MTA Team botder Posted December 19, 2014 MTA Team Posted December 19, 2014 Use isElementWithinColShape for both colshapes in an AND-statement (a and b)
iPanda Posted December 19, 2014 Author 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
Castillo Posted December 19, 2014 Posted December 19, 2014 You can set one to be the parent of the other. setElementParent
iPanda Posted December 20, 2014 Author Posted December 20, 2014 How can I check whether there is a one collision part hit to another collision part?
Anubhav Posted December 20, 2014 Posted December 20, 2014 onColShapeHit and see if the thing which hit is a colshape. ( might work )
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