cme
cme copied to clipboard
Add attraction node
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.
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.
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?
@BrunoMine sure