Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] is it possible to have a creature follow a spline path (`GetMotionMaster()->MoveSplinePath(path)`) b

[DiscordArchive] is it possible to have a creature follow a spline path (`GetMotionMaster()->MoveSplinePath(path)`) b

[DiscordArchive] is it possible to have a creature follow a spline path (`GetMotionMaster()->MoveSplinePath(path)`) b

rektbyfaith
Administrator
0
10-23-2023, 04:55 AM
#1
Archived author: KJack • Posted: 2023-10-23T04:55:33.875000+00:00
Original source

is it possible to have a creature follow a spline path (`GetMotionMaster()->MoveSplinePath(path)`) but repeat it? i see how i can do that for MovePath(), but I don't see a way to do it with MoveSplinePath() ?
rektbyfaith
10-23-2023, 04:55 AM #1

Archived author: KJack • Posted: 2023-10-23T04:55:33.875000+00:00
Original source

is it possible to have a creature follow a spline path (`GetMotionMaster()->MoveSplinePath(path)`) but repeat it? i see how i can do that for MovePath(), but I don't see a way to do it with MoveSplinePath() ?

rektbyfaith
Administrator
0
10-23-2023, 05:00 AM
#2
Archived author: KJack • Posted: 2023-10-23T05:00:15.937000+00:00
Original source

i guess i can time how long the path takes and then queue it to go again at the end but that seems...wrong? `PathEndReached` doesn't appear to get fired when using `MoveSplinePath()`.
rektbyfaith
10-23-2023, 05:00 AM #2

Archived author: KJack • Posted: 2023-10-23T05:00:15.937000+00:00
Original source

i guess i can time how long the path takes and then queue it to go again at the end but that seems...wrong? `PathEndReached` doesn't appear to get fired when using `MoveSplinePath()`.

rektbyfaith
Administrator
0
10-23-2023, 05:01 AM
#3
Archived author: KJack • Posted: 2023-10-23T05:01:53.241000+00:00
Original source

maybe check to see when the creature is at the last point in the path?
rektbyfaith
10-23-2023, 05:01 AM #3

Archived author: KJack • Posted: 2023-10-23T05:01:53.241000+00:00
Original source

maybe check to see when the creature is at the last point in the path?

rektbyfaith
Administrator
0
10-23-2023, 06:46 AM
#4
Archived author: KJack • Posted: 2023-10-23T06:46:14.304000+00:00
Original source

for posterity, this is the best solution i've come up with so far:

```c++
// if the creature isn't moving, run the loop
if (me->isMoving() == false)
{
me->GetMotionMaster()->MoveSplinePath(&_pathPoints);
}
```
rektbyfaith
10-23-2023, 06:46 AM #4

Archived author: KJack • Posted: 2023-10-23T06:46:14.304000+00:00
Original source

for posterity, this is the best solution i've come up with so far:

```c++
// if the creature isn't moving, run the loop
if (me->isMoving() == false)
{
me->GetMotionMaster()->MoveSplinePath(&_pathPoints);
}
```

rektbyfaith
Administrator
0
10-23-2023, 06:46 AM
#5
Archived author: KJack • Posted: 2023-10-23T06:46:53.447000+00:00
Original source

now i have to figure out how to get `events` to actually schedule events, and i'll be halfway home
rektbyfaith
10-23-2023, 06:46 AM #5

Archived author: KJack • Posted: 2023-10-23T06:46:53.447000+00:00
Original source

now i have to figure out how to get `events` to actually schedule events, and i'll be halfway home

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)