Lynxz Gaming Expert Cheater Reputation: 4 Joined: 01 Jul 2017 Posts: 208 Location: help
|
Posted: Sat Jun 15, 2019 10:30 pm Post subject: onCollision |
|
|
check collision
script :
Code: | function onCollision(obj1,obj2)
obj1x = obj1.left
obj1y = obj1.top
obj1w = obj1.width
obj1h = obj1.height
obj2x = obj2.left
obj2y = obj2.top
obj2w = obj2.width
obj2h = obj2.height
if obj2x + obj2w >= obj1x and obj2y + obj2h >= obj1y and obj2y <= obj1y + obj1h and obj2x <= obj1x + obj1w then
return true
end
end |
example to use
Code: | if onCollision(UDF1.CEPanel1,UDF1.CEPanel2) == true then
showMessage("ayy")
end |
my example ct
https://mega.nz/#!LO4lWYha!2IBLk_oLvwi7ie92UctAtNFjZlv279m-PB_WCPnDbSg _________________ my english is bad
discord : rynx#9828
|
|