Hello Everybody!
I was wondering if it's possible to get the distance between the player's position and the selected enemy on the map. Right now I am using Alpha ABS plugin, and I am trying to find the distance between the player and the enemy.
I was wondering how you would do that? The enemy on the screenshot is event 2 so I had this:
$gameMap.distance($gamePlayer._x,$gamePlayer._y,$gameMap._events[2]._x,$gameMap._events[2]._y)<15
It works, but this is only for one specific event. I was wondering if there is a more universal way to do it and get the targeted enemy's distance regardless of it's event name. This condition branch will be used in a common event, so I don't think I can use this.eventId, maybe use the enemyId?
Thanks in advance for your help!
Cheers XD
I was wondering if it's possible to get the distance between the player's position and the selected enemy on the map. Right now I am using Alpha ABS plugin, and I am trying to find the distance between the player and the enemy.
I was wondering how you would do that? The enemy on the screenshot is event 2 so I had this:
$gameMap.distance($gamePlayer._x,$gamePlayer._y,$gameMap._events[2]._x,$gameMap._events[2]._y)<15
It works, but this is only for one specific event. I was wondering if there is a more universal way to do it and get the targeted enemy's distance regardless of it's event name. This condition branch will be used in a common event, so I don't think I can use this.eventId, maybe use the enemyId?
Thanks in advance for your help!
Cheers XD