[DiscordArchive] But the boss can assign a custom AI script to the creatures he spawns?
[DiscordArchive] But the boss can assign a custom AI script to the creatures he spawns?
Archived author: Kitzunu • Posted: 2023-10-22T17:32:56.392000+00:00
Original source
Correct
Archived author: KJack • Posted: 2023-10-22T19:34:01.333000+00:00
Original source
Is this the right way to override the AI setting of "SmartAI" in the DB?
```c++
// only if the bat rider was successfully created
if (Creature* batRider = me->SummonCreature(NPC_BAT_RIDER, SpawnBatRider, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
{
// this creature (14750) is the same creature as the trash ones on the ground
// we need to override the DB's setting of SmartAI
batRider->SetAI(new npc_batrider(batRider));
batRider->AI()->DoZoneInCombat();
}
```
Archived author: KJack • Posted: 2023-10-22T19:34:49.185000+00:00
Original source
where `npc_batrider` is this thing:
```c++
// Gurubashi Bat Rider (14750) that drops bombs
struct npc_batrider : public ScriptedAI
{
npc_batrider(Creature* creature) : ScriptedAI(creature)
<...>
```
![[Image: image.png?ex=690c54c7&is=690b0347&hm=beb...57bc0319d&]](https://cdn.discordapp.com/attachments/689803159086170250/1165740591217397760/image.png?ex=690c54c7&is=690b0347&hm=beb5be1d46ef558366b65f0e26f1255339baa016bcba8ad27bead7257bc0319d&)
Archived author: KJack • Posted: 2023-10-22T19:56:55.419000+00:00
Original source
nada
![[Image: image.png?ex=690c54c7&is=690b0347&hm=beb...57bc0319d&]](https://cdn.discordapp.com/attachments/689803159086170250/1165740591217397760/image.png?ex=690c54c7&is=690b0347&hm=beb5be1d46ef558366b65f0e26f1255339baa016bcba8ad27bead7257bc0319d&)
Archived author: KJack • Posted: 2023-10-22T19:57:05.612000+00:00
Original source
and they go straight for my player instead of doing what they're told
Archived author: KJack • Posted: 2023-10-22T20:00:19.831000+00:00
Original source
although they're not doing their SAI actions either. they're just following me without attacking.