How to detect what object an object is

Problems Koding something? Get help from other users here!
TheInventor
Level 1
Level 1
Posts: 22

How to detect what object an object is

Post#1 » Mon Feb 26, 2018 9:13 pm

I have a world that has natural trees and rocks that generated with the world. I want to be able to harvest the trees and rocks for resources. I have an object that adds a brain to every object that's visible with the fixed physics type. The brain basically turns off the invulnerability of the object and drops items on death. How can I make it so that that brain can tell what type of object it is in, such as tree or rock? I need this so that rocks can drop stone, and trees can drop sticks and wood.

Thanks!

Return to “Koding Konversations”

Who is online

Users browsing this forum: No registered users and 1 guest

cron