Search found 5 matches

by namelessarcana
Tue Sep 20, 2022 11:57 pm
Forum: Support and Development
Topic: Calling Function from Collided Object in Windfield?
Replies: 8
Views: 1910

Re: Calling Function from Collided Object in Windfield?

Thank you so much. I have the functionality working just how I was wanting it to now, thank you so much! I might see if there is a further way to "genericize" the "getYarrowByCollider" function when I am ready to add more things for the player to interact with, but your suggestio...
by namelessarcana
Tue Sep 20, 2022 12:52 am
Forum: Support and Development
Topic: Calling Function from Collided Object in Windfield?
Replies: 8
Views: 1910

Re: Calling Function from Collided Object in Windfield?

No, that makes sense. So then player.lua should have access to the harvest() function. This might be a dumb question, but how would I iterate through the "yarrows" table from inside the "playerInteract()" function? Since the "ipairs(harvestables)" just contains collider...
by namelessarcana
Sun Sep 18, 2022 9:47 pm
Forum: Support and Development
Topic: Calling Function from Collided Object in Windfield?
Replies: 8
Views: 1910

Re: Calling Function from Collided Object in Windfield?

Okay, I was misunderstanding what queryCircleArea() returned, thank you. Will I need to add a require("yarrow") in player.lua, since all the code for the yarrow object is in the yarrow.lua file? Or is there a way to get them to "talk" to one another without adding a 'require' lin...
by namelessarcana
Sun Sep 18, 2022 5:22 pm
Forum: Support and Development
Topic: Calling Function from Collided Object in Windfield?
Replies: 8
Views: 1910

Re: Calling Function from Collided Object in Windfield?

Okay, I changed the function name from "harvested()" to just "harvest()" to avoid the namespace collision, thank you for letting me know that would be an issue.. Unfortunately, the "Attempt to call method 'harvest' (a nil value)" error is still occurring.
by namelessarcana
Sat Sep 17, 2022 5:27 pm
Forum: Support and Development
Topic: Calling Function from Collided Object in Windfield?
Replies: 8
Views: 1910

Calling Function from Collided Object in Windfield?

Hi all, I am a super-newbie, so hopefully I can articulate this question properly, but I am running into an area involving collisions between objects in my test project. Basically, I am using Windfield so help with collisions in a top-down game, and I have a "player.lua" file with a "...