azerothcore/mod-eluna

Allow multiple AIs in parallel

Closed this issue · 4 comments

Event related to RegisterCreatureEvent

For example, for CREATURE_ EVENT_ ON_ ENTER_ The COMBAT event returns false and cannot function properly. Of course, this creature has a 'ScriptName'
Printable, indicating that the event is functioning properly
But the ScriptName of 36612 is not working properly
I returned false
Is it because once there is a ScriptName, it cannot be used simultaneously with CreatureEvent?
Creature: 36612 = boss_lord_marrowgar
Test Code:
RegisterCreatureEvent(36612,1, function(event, creature) print("go into action")-- return false; end)

I believe the expected behavior is:

  1. The console prints logs normally

  2. It should enter the appropriate ScriptName logical section

It tells me that I won't hit this breakpoint
qq123

Is it because once there is a ScriptName, it cannot be used simultaneously with CreatureEvent?

Yes. There can be only one AI. SAI, C++ script, or Lua. Not multiple.

thx reply, I understand

But if it can coexist That would be even better

I agree, but it's a core limitation.
With C++ scripting, you can currently have scheduled events on top of the creature AI at least.