Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Cheat Engine Forum Index
PostGo back to topic
Lynxz Gaming
Expert Cheater
Reputation: 4
Joined: 01 Jul 2017
Posts: 208
Location: help

PostPosted: 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
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Post reviews:   Approve 1
Author Review
AylinCE
Review: Approve
Post reference:
ReviewPosted: Wed Jul 03, 2019 3:40 am

And congratulations again, man, please go ahead.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display:  
Cheat Engine Forum Index


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites