Skip to content
This repository has been archived by the owner on Dec 14, 2019. It is now read-only.

Add attraction node #5

Open
BrunoMine opened this issue Jan 20, 2016 · 3 comments
Open

Add attraction node #5

BrunoMine opened this issue Jan 20, 2016 · 3 comments

Comments

@BrunoMine
Copy link

I imagine it is interesting to create friendly creatures with whom the player can interact (NPCs).
I've been trying to do this with the spawning node, but ends up appearing like creatures 2 (a bad thing for a character's adventures).
The attraction node will keep the character walking around and avoiding spawning his own (since it is near a spawning node).

creatures.register_mob({ spawning = { attractant = { range = n } } })

In summary the objective is to keep the mob near a position.

@BlockMen
Copy link
Owner

BlockMen commented Feb 3, 2016

You can add a costum function in you MOB definition. https://github.com/BlockMen/cme/blob/master/API.txt#L174
There you can do whatever you want, it is executed additional by default. See the sheep as example to add costum on_step() function to definiton ;)

Anyway, it might be interesting to have this in, idk yet.

@BrunoMine
Copy link
Author

Ok.
I want to translate the API for my native language (new file API-pt_BR.txt for cme) and i can update constantly. OK for you?

@BlockMen
Copy link
Owner

@BrunoMine sure

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants