Hi guys!!
So I'm trying to make a system that, when an event sees the player, it chases him. Just like Eventchaseplayer Plugin by Yanfly, but using only events, since I can't use this plugin for reasons that it conflicts with other plugins that I'm currently using.
I got 50% of what I want to work, But there are some points that I can't solve by myself. One of them is how to make it so that when the event stops seeing the player, it stops the chase and returns to the initial position of the event.
And also, the chase is not perfect, because the event gets stuck in corners.
I try to use this script call, but things starts to lagging (I'm using AltimitMovement plugin so that's why it is lagging, when I turn it off it works fine, but this pixel movement is really important for my project):
So I have to use a different approach. Can someone help me with this?
I followed this tutorial by TheOdie, about line of sights, for my event:
First page and up like this:
The red portion was replaced by this:
There is more information about those script calls here
And I create a second event page that make the event chase the player:
So I'm trying to make a system that, when an event sees the player, it chases him. Just like Eventchaseplayer Plugin by Yanfly, but using only events, since I can't use this plugin for reasons that it conflicts with other plugins that I'm currently using.
I got 50% of what I want to work, But there are some points that I can't solve by myself. One of them is how to make it so that when the event stops seeing the player, it stops the chase and returns to the initial position of the event.
And also, the chase is not perfect, because the event gets stuck in corners.
I try to use this script call, but things starts to lagging (I'm using AltimitMovement plugin so that's why it is lagging, when I turn it off it works fine, but this pixel movement is really important for my project):
Code:
$gameMap._events[this._eventId].moveStraight( $gameMap._events[this._eventId].findDirectionTo($gamePlayer.x, $gamePlayer.y));
So I have to use a different approach. Can someone help me with this?
I followed this tutorial by TheOdie, about line of sights, for my event:
First page and up like this:
The red portion was replaced by this:
There is more information about those script calls here
And I create a second event page that make the event chase the player: