[DiscordArchive] alternatively, does anyone have a good example of a modern, correctly-written BossAI and/or Creature
[DiscordArchive] alternatively, does anyone have a good example of a modern, correctly-written BossAI and/or Creature
Archived author: KJack • Posted: 2023-10-24T15:29:52.839000+00:00
Original source
alternatively, does anyone have a good example of a modern, correctly-written BossAI and/or CreatureAI that I can mimic?
Archived author: Nyeriah • Posted: 2023-10-24T15:42:07.684000+00:00
Original source
newer boss scripts use taskscheduler
Archived author: Nyeriah • Posted: 2023-10-24T15:42:35.284000+00:00
Original source
you can use either of them, it doesnt matter
Archived author: Nyeriah • Posted: 2023-10-24T15:43:18.024000+00:00
Original source
karazhan scripts should be good to use as examples
Archived author: KJack • Posted: 2023-10-24T15:45:13.524000+00:00
Original source
okay, great. I was using Moroes and Shade as templates, just want to make sure I'm doing it right the first time.
Archived author: KJack • Posted: 2023-10-24T15:45:32.743000+00:00
Original source
and that the EventMap with the events in UpdateAI() pattern is still considered modern.
Archived author: KJack • Posted: 2023-10-24T15:48:24.434000+00:00
Original source
sorry for all the questions, drinking from the fire hose on AI development now.
what is the difference between this pattern:
```c++
struct boss_moroes : public BossAI
{
boss_moroes(Creature* creature) : BossAI(creature, DATA_MOROES)
<...>
```
and this pattern
```c++
class npc_image_of_medivh : public CreatureScript
{
public:
npc_image_of_medivh() : CreatureScript("npc_image_of_medivh") { }
CreatureAI* GetAI(Creature* creature) const override
{
return GetKarazhanAI<npc_image_of_medivhAI>(creature);
}
struct npc_image_of_medivhAI : public ScriptedAI
{
npc_image_of_medivhAI(Creature* creature) : ScriptedAI(creature)
{
<...>
```
?
Archived author: KJack • Posted: 2023-10-24T15:50:32.404000+00:00
Original source
I see that they're added differently (`RegisterKarazhanCreatureAI(boss_moroes);` vs `new npc_image_of_medivh();`) but I don't understand what differentiates the two approaches.
Archived author: KJack • Posted: 2023-10-24T15:50:52.997000+00:00
Original source
let me know if i should take this to a different channel.
Archived author: Nyeriah • Posted: 2023-10-24T16:10:39.658000+00:00
Original source
Well they’re scripts of two different natures