Cuberite Forum
How to make a Monster attack Player - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html)
+--- Thread: How to make a Monster attack Player (/thread-3462.html)



How to make a Monster attack Player - Goxe99 - 05-01-2025

Hellooo Smile , I have been reading the documentation and I don't see any method like SetTarget or AttackEntity in cMonster, how is it done? Huh


RE: How to make a Monster attack Player - Goxe99 - 05-01-2025

I am seeing in the C++ source code of the Monster class that it contains a ->SetTarget() method but it seems that it is not exposed for use in Lua?


RE: How to make a Monster attack Player - NiLSPACE - 05-01-2025

Hi, welcome to the forum. Unfortunately the api for monsters is rather lacking. There were plans for a modular approach where monster AI could easily be swapped with something different or even custom logic from a plugin, but that hasn't been worked on in years.


RE: How to make a Monster attack Player - Goxe99 - 05-01-2025

Ohh, i see :7 all right thank u for the answer