[DiscordArchive] What changes?
[DiscordArchive] What changes?
Archived author: Foe • Posted: 2022-05-28T22:12:11.281000+00:00
Original source
Yep, it's something I want to get done, but we don't really have the time or development resources for it ♂️
Archived author: Honey • Posted: 2022-05-28T22:12:41.643000+00:00
Original source
I feel you. Time is crucial.
Archived author: Honey • Posted: 2022-05-28T22:13:27.109000+00:00
Original source
One day i'll win that lottery jackpot and go from dayjob to cpp dev
Archived author: Honey • Posted: 2022-05-30T19:02:20.149000+00:00
Original source
Hi Foe, I have a question about this one if you don't mind:
I just tried this script:
```lua
local CREATURE_EVENT_ON_ENTER_COMBAT = 1
local CREATURE_EVENT_ON_DIED = 4
local function CreatureEnteredCombat(event, creature, target)
print('------')
print(creature:GetName())
print('Has entered combat.')
print('------')
end
local function CreatureDied(event, creature, killer)
print('------')
print(creature:GetName())
print('HasDied')
print('------')
print()
end
RegisterCreatureEvent(12118,CREATURE_EVENT_ON_ENTER_COMBAT,CreatureEnteredCombat)
RegisterCreatureEvent(12118,CREATURE_EVENT_ON_DIED,CreatureDied)
```
I see this in the console:
```
------
Lucifron
Has entered combat.
------
------
Lucifron
HasDied
------
```
And Lucifron does only auto attacks. It resulted in Lucifron's AI being completely overwritten. Is that related to AC?
<https://github.com/azerothcore/azerothcore-wotlk/blob/master/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp>
Lucifron is 100% a .cpp script.
Archived author: Honey • Posted: 2022-05-30T19:06:22.494000+00:00
Original source
Tried the same with Geddon, same result.
Archived author: Foe • Posted: 2022-05-30T19:09:38.090000+00:00
Original source
You can't mix cpp and Lua
Archived author: Foe • Posted: 2022-05-30T19:09:55.301000+00:00
Original source
Either script a creature in Lua or in cpp, they can't have multiple AIs
Archived author: Honey • Posted: 2022-05-30T19:10:52.660000+00:00
Original source
I got that, thanks.
Just the order that you mentioned
> C++ > Lua > DB
confuses me because of the result.
Archived author: Honey • Posted: 2022-05-30T19:11:14.708000+00:00
Original source
I had hoped i could sneak something in since c++ would win for the creatures behaviour.
Archived author: Foe • Posted: 2022-05-30T19:11:51.561000+00:00
Original source
I might have it the wrong way around, where Lua overwrites c++ in some cases, it's been like 10 years so I can't remember