It looks like you're new here. If you want to get involved, click one of these buttons!
I am having trouble using the touch function from classes other than the main one. For example, if I try calling the function inside the main class it doesn't work, and I can't call the function inside the class where it is needed, or otherwise is presents me with an error. Can anyone help me out on a possible solution as I never really got the hang of this, and have been putting this off for some time. Thanks!
Comments
@DarrellBro I'm sorry, I just can't stand the sight of this. It's you're, not your.
@YoloSwag I'm not sure what you've already done, so I'm just giving the basics here.
If you have defined
MyClass = class()
and a functionMyClass:touched(touch)
, you can call the touch function like this:Make sure you pass the
touch
userdata to the function every time you call it.Something like this
Edit: i just posted a second after @Kjell
Thank you both. This helps a lot!