- Joined
- Jan 3, 2014
- Messages
- 8
- Reaction score
- 0
- First Language
- English
- Primarily Uses
I'm trying to change the value of a variable to the events ID when the player is within range of it. This is what I have but it's not working.
var get_distance = [Math.abs($gamePlayer._x - this.eventId._x), Math.abs($gamePlayer._y - this.eventId._y)];
var target_distance = 100;
if (get_distance[0]<=target_distance && get_distance[1]<=target_distance){
I am using Qmovement and QABS plugins.
How can I make this work?
var get_distance = [Math.abs($gamePlayer._x - this.eventId._x), Math.abs($gamePlayer._y - this.eventId._y)];
var target_distance = 100;
if (get_distance[0]<=target_distance && get_distance[1]<=target_distance){
$gameVariables.setValue(5, this.eventId);
}I am using Qmovement and QABS plugins.
How can I make this work?

