Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] This is my first time working with scripted AI, and I'd appreciate some help if someone has time to

[DiscordArchive] This is my first time working with scripted AI, and I'd appreciate some help if someone has time to

[DiscordArchive] This is my first time working with scripted AI, and I'd appreciate some help if someone has time to

Pages (8): 1 2 3 4 5 8 Next  
rektbyfaith
Administrator
0
10-23-2023, 07:17 AM
#1
Archived author: KJack • Posted: 2023-10-23T07:17:55.224000+00:00
Original source

This is my first time working with scripted AI, and I'd appreciate some help if someone has time to look. I'm having a very difficult time getting events to actually schedule. I'm looking at other examples that work fine and I don't understand why mine is different. Can anyone clue me in?

<https://github.com/azerothcore/azerothcore-wotlk/blob/5b8352f69c5a1795d006fc1f64a166137649d416/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp#L124-L217>

Specifically, the event scheduled at line 186 never fires. I verified that JustEngagedWith IS getting fired and I get the LOG_ERROR debug I (temporarily) threw in there.

I also know that UpdateAI is firingbecause my MoveSplinePath logic is working correctly. It's just the event case statement that never gets called.

Can someone tell me what kind of idiot I am?
rektbyfaith
10-23-2023, 07:17 AM #1

Archived author: KJack • Posted: 2023-10-23T07:17:55.224000+00:00
Original source

This is my first time working with scripted AI, and I'd appreciate some help if someone has time to look. I'm having a very difficult time getting events to actually schedule. I'm looking at other examples that work fine and I don't understand why mine is different. Can anyone clue me in?

<https://github.com/azerothcore/azerothcore-wotlk/blob/5b8352f69c5a1795d006fc1f64a166137649d416/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp#L124-L217>

Specifically, the event scheduled at line 186 never fires. I verified that JustEngagedWith IS getting fired and I get the LOG_ERROR debug I (temporarily) threw in there.

I also know that UpdateAI is firingbecause my MoveSplinePath logic is working correctly. It's just the event case statement that never gets called.

Can someone tell me what kind of idiot I am?

rektbyfaith
Administrator
0
10-23-2023, 07:20 AM
#2
Archived author: KJack • Posted: 2023-10-23T07:20:54.941000+00:00
Original source

This is the log output that happens during the encounter:

```
Jeklk: EVENT_SPAWN_FLYING_BATS
Bat Rider: mode: NPC_BAT_RIDER_MODE_BOSS
Bat Rider: Reset
Bat Rider: JustEngagedWith Testbiah
Bat Rider: mode: NPC_BAT_RIDER_MODE_BOSS
Bat Rider: not moving, re-running loop
Jeklk: EVENT_SPAWN_FLYING_BATS
Bat Rider: mode: NPC_BAT_RIDER_MODE_BOSS
Bat Rider: Reset
Bat Rider: JustEngagedWith Testbiah
Bat Rider: mode: NPC_BAT_RIDER_MODE_BOSS
Bat Rider: not moving, re-running loop
Bat Rider: not moving, re-running loop
Bat Rider: not moving, re-running loop
Bat Rider: not moving, re-running loop
```
rektbyfaith
10-23-2023, 07:20 AM #2

Archived author: KJack • Posted: 2023-10-23T07:20:54.941000+00:00
Original source

This is the log output that happens during the encounter:

```
Jeklk: EVENT_SPAWN_FLYING_BATS
Bat Rider: mode: NPC_BAT_RIDER_MODE_BOSS
Bat Rider: Reset
Bat Rider: JustEngagedWith Testbiah
Bat Rider: mode: NPC_BAT_RIDER_MODE_BOSS
Bat Rider: not moving, re-running loop
Jeklk: EVENT_SPAWN_FLYING_BATS
Bat Rider: mode: NPC_BAT_RIDER_MODE_BOSS
Bat Rider: Reset
Bat Rider: JustEngagedWith Testbiah
Bat Rider: mode: NPC_BAT_RIDER_MODE_BOSS
Bat Rider: not moving, re-running loop
Bat Rider: not moving, re-running loop
Bat Rider: not moving, re-running loop
Bat Rider: not moving, re-running loop
```

rektbyfaith
Administrator
0
10-23-2023, 07:28 AM
#3
Archived author: Anchy • Posted: 2023-10-23T07:28:19.906000+00:00
Original source

are any events firing at all
rektbyfaith
10-23-2023, 07:28 AM #3

Archived author: Anchy • Posted: 2023-10-23T07:28:19.906000+00:00
Original source

are any events firing at all

rektbyfaith
Administrator
0
10-23-2023, 07:28 AM
#4
Archived author: KJack • Posted: 2023-10-23T07:28:38.123000+00:00
Original source

for the boss (Jeklik), yes. for my bat rider, no.
rektbyfaith
10-23-2023, 07:28 AM #4

Archived author: KJack • Posted: 2023-10-23T07:28:38.123000+00:00
Original source

for the boss (Jeklik), yes. for my bat rider, no.

rektbyfaith
Administrator
0
10-23-2023, 07:28 AM
#5
Archived author: KJack • Posted: 2023-10-23T07:28:52.838000+00:00
Original source

EVENT_SPAWN_FLYING_BATS is what's summoning the bats
rektbyfaith
10-23-2023, 07:28 AM #5

Archived author: KJack • Posted: 2023-10-23T07:28:52.838000+00:00
Original source

EVENT_SPAWN_FLYING_BATS is what's summoning the bats

rektbyfaith
Administrator
0
10-23-2023, 07:28 AM
#6
Archived author: Anchy • Posted: 2023-10-23T07:28:58.259000+00:00
Original source

have you created an EventMap
rektbyfaith
10-23-2023, 07:28 AM #6

Archived author: Anchy • Posted: 2023-10-23T07:28:58.259000+00:00
Original source

have you created an EventMap

rektbyfaith
Administrator
0
10-23-2023, 07:29 AM
#7
Archived author: KJack • Posted: 2023-10-23T07:29:38.708000+00:00
Original source

it *looks* to me like one comes with CreatureAI.

<https://github.com/kjack9/azerothcore-wotlk/blob/5b8352f69c5a1795d006fc1f64a166137649d416/src/server/game/AI/CreatureAI.h#L74>
rektbyfaith
10-23-2023, 07:29 AM #7

Archived author: KJack • Posted: 2023-10-23T07:29:38.708000+00:00
Original source

it *looks* to me like one comes with CreatureAI.

<https://github.com/kjack9/azerothcore-wotlk/blob/5b8352f69c5a1795d006fc1f64a166137649d416/src/server/game/AI/CreatureAI.h#L74>

rektbyfaith
Administrator
0
10-23-2023, 07:30 AM
#8
Archived author: KJack • Posted: 2023-10-23T07:30:08.207000+00:00
Original source

some scripts seems to use that one, others declare their own. i did try making my own and it didn't seem to matter.
rektbyfaith
10-23-2023, 07:30 AM #8

Archived author: KJack • Posted: 2023-10-23T07:30:08.207000+00:00
Original source

some scripts seems to use that one, others declare their own. i did try making my own and it didn't seem to matter.

rektbyfaith
Administrator
0
10-23-2023, 07:30 AM
#9
Archived author: Anchy • Posted: 2023-10-23T07:30:25.754000+00:00
Original source

honestly I had the same issue so I made my own event map and it worked
rektbyfaith
10-23-2023, 07:30 AM #9

Archived author: Anchy • Posted: 2023-10-23T07:30:25.754000+00:00
Original source

honestly I had the same issue so I made my own event map and it worked

rektbyfaith
Administrator
0
10-23-2023, 07:30 AM
#10
Archived author: KJack • Posted: 2023-10-23T07:30:49.346000+00:00
Original source

hah! okay, let me see if i can rework that then.

any reason i shouldn't be doing work in the constructor?
rektbyfaith
10-23-2023, 07:30 AM #10

Archived author: KJack • Posted: 2023-10-23T07:30:49.346000+00:00
Original source

hah! okay, let me see if i can rework that then.

any reason i shouldn't be doing work in the constructor?

Pages (8): 1 2 3 4 5 8 Next  
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)