https://imgur.com/I4nwn47

Hello,
As you can see in the video above I encountered issues with collisions between events.

Steps to reproduce:
Call moveTo on multiple events. I do it when a collision with a moving hitbox is detected by:

        victim.breakRoutes(true);
        victim.stopMoveTo();
        victim.moveTo(attacker).subscribe();

Moving hitbox:

        this.player.getCurrentMap()?.createMovingHitbox(
            [
                { x: this.getPositionX(), y: this.getPositionY(), width: HITBOX.x, height: HITBOX.y },
            ]
        ).subscribe({
            next(hitbox) {
                var otherPlayersCollision = that.excludePlayer(hitbox.otherPlayersCollision as RpgPlayer[]);

                otherPlayersCollision.forEach((player: RpgPlayer) => {
                    FollowPlayer.onHit(player, that.player);
                    TakeDamage.onHit(player, that.player);
                })
            },
        })

Then just move around.
And as you can see after a few moments events stop to collide among them.

Issue 1. I can go through these events.
Issue 2: hitbox does not have an impact on them because it does not decrease their HP.

8 days later

Hello,

Thanks for the feedback. Sorry I didn't reply sooner, I was on vacation.

I'm looking at the different points 🙂

    a month later

    Hello @Samarium

    Did you have time to take a look?

    Here is the video of the current version: https://imgur.com/SWTAH39

    When it occurs then RPGEvents:

    1. Does not respect collision anymore, with players, events, and tileset objects.
    2. These events are not returned in the createMovingHitbox method as otherPlayersCollision

    It fixes by "itself" because I implemented a logic that helps me temporarily:

    1. Follow the player after being attacked
    2. onComplete or onStuck start moving randomly (I suppose here it fixes itself - I can attack this event again and collision is restored)
    3. after 3-5 seconds start following the player again

    This temporary solution is ok for now, but it is impossible to go as production ready because such RPGEvent is just immortal and can attack you until you die.

      7 days later

      At the moment, I'm having trouble reproducing this bug 😐, but I'm still working on it.

        Samarium

        Hello

        You can check it in my game.

        1. Just take some mobs to attack you, about 4-5. (C - Attack, J - Skill)
        2. Next you have to move around for a moment and you will see when it occurs when you can go through the mob (visible at the start of my video)
        3. Then you can't kill it because it because this RpgEvent is not returned in otherPlayersCollision

        Video: https://imgur.com/tWXpITz

        7 days later

        RPGJS_Bot

        I tested it a bit and it looks like it works. Thank you

        Nice bot function added to this community! 😄