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 


onCollision

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions
View previous topic :: View next topic  
Author Message
Lynxz Gaming
Expert Cheater
Reputation: 2

Joined: 01 Jul 2017
Posts: 179
Location: my home

PostPosted: Sat Jun 15, 2019 10:30 pm    Post subject: onCollision This post has 1 review(s) Reply with quote

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

_________________
discord : Lynxz Gaming#2527
Back to top
View user's profile Send private message
Aylin
Master Cheater
Reputation: 7

Joined: 16 Feb 2017
Posts: 397

PostPosted: Wed Jun 26, 2019 10:51 pm    Post subject: Reply with quote

I have 1-2 projects.
When it's over, I can start a game project.
Nice game and idea, congratulations. Smile

_________________
Hi Hitler Make a Youtube Web for Trainer
https://forum.cheatengine.org/viewtopic.php?t=609146
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message MSN Messenger
Corroder
Grandmaster Cheater
Reputation: 27

Joined: 10 Apr 2015
Posts: 987

PostPosted: Fri Jun 28, 2019 8:09 am    Post subject: Reply with quote

Lynxz Gaming, here with little modification.

Video:
https://youtu.be/Y-4X3IlkKi0



Shaggy Jump.JPG
 Description:
 Filesize:  85.29 KB
 Viewed:  4761 Time(s)

Shaggy Jump.JPG



_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 28

Joined: 13 Sep 2011
Posts: 1468

PostPosted: Fri Jun 28, 2019 9:06 am    Post subject: Reply with quote

I tried to write some small game in lua 4 years ago.. hope it would come handy to anyone..

WASD + shift(to run)
Arrow keys + ctrl (to run)

goal was to try and make networked game but no avail.



game.CT.lua
 Description:
Convert to .ct

Download
 Filename:  game.CT.lua
 Filesize:  102.31 KB
 Downloaded:  148 Time(s)


_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater
Reputation: 27

Joined: 10 Apr 2015
Posts: 987

PostPosted: Fri Jun 28, 2019 11:33 am    Post subject: Reply with quote

DaSpamer wrote:
I tried to write some small game in lua 4 years ago.. hope it would come handy to anyone..


Yes, I already have your game about 2 years ago. A good project considering that it was made using CE Lua. We know that CE is not specialized for making game projects like Love 2D, Eclipse and other similar applications.

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 28

Joined: 13 Sep 2011
Posts: 1468

PostPosted: Fri Jun 28, 2019 12:36 pm    Post subject: Reply with quote

Corroder wrote:
DaSpamer wrote:
I tried to write some small game in lua 4 years ago.. hope it would come handy to anyone..


Yes, I already have your game about 2 years ago. A good project considering that it was made using CE Lua. We know that CE is not specialized for making game projects like Love 2D, Eclipse and other similar applications.

Really? where did you get it from? I never shared it as I never completed my goal.. was hoping to try make it local lan, to try and create communicating trainers.

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater
Reputation: 27

Joined: 10 Apr 2015
Posts: 987

PostPosted: Fri Jun 28, 2019 9:00 pm    Post subject: Reply with quote

DaSpamer wrote:
Really? where did you get it from? I never shared it as I never completed my goal.. was hoping to try make it local lan, to try and create communicating trainers.


Your post is here : https://forum.cheatengine.org/viewtopic.php?t=579790

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 28

Joined: 13 Sep 2011
Posts: 1468

PostPosted: Sat Jun 29, 2019 7:25 am    Post subject: Reply with quote

Corroder wrote:
DaSpamer wrote:
Really? where did you get it from? I never shared it as I never completed my goal.. was hoping to try make it local lan, to try and create communicating trainers.


Your post is here : https://forum.cheatengine.org/viewtopic.php?t=579790

Oh wow, been a while Smile)
Perhaps one day Ill complete it

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
Aylin
Master Cheater
Reputation: 7

Joined: 16 Feb 2017
Posts: 397

PostPosted: Sun Jun 30, 2019 9:21 pm    Post subject: Reply with quote

Thanks @Lynxz Gaming
I used the following code.
and I did a similar game.

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



I'm gonna put it up for you to try it out.



11.JPG
 Description:
 Filesize:  89.94 KB
 Viewed:  4541 Time(s)

11.JPG



12.JPG
 Description:
 Filesize:  93.98 KB
 Viewed:  4541 Time(s)

12.JPG



_________________
Hi Hitler Make a Youtube Web for Trainer
https://forum.cheatengine.org/viewtopic.php?t=609146
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message MSN Messenger
Aylin
Master Cheater
Reputation: 7

Joined: 16 Feb 2017
Posts: 397

PostPosted: Wed Jul 10, 2019 7:18 am    Post subject: Reply with quote

DaSpamer wrote:
I tried to write some small game in lua 4 years ago.. hope it would come handy to anyone..

WASD + shift(to run)
Arrow keys + ctrl (to run)

goal was to try and make networked game but no avail.



beautiful thinking and coding.
I think not in vain,
it was a very clean job.
I hope you keep writing games.

_________________
Hi Hitler Make a Youtube Web for Trainer
https://forum.cheatengine.org/viewtopic.php?t=609146
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites