Closed Noah2610 closed 4 years ago
Add Interactable
and CanInteract
components.
CanInteract
entities can interact with Interactable
entities.
Interactable
entities can use the OnInteract
event, which triggers when its interacted with.
Working. Entity config example:
components: (
// Make the entity interactable with the player.
interactable: (),
),
events: {
// Do something when the player interacts with this entity.
OnInteract: Echo("You interacted with me!"),
},
Player can pickup consumables like health up and extra lives.