Hi,
I have some events which have a variable called _player. This is used to just give them an id number that associates with a player.
I do this by:
$gameMap._events[event]._player = player;
Where player is an integer.
The following works:
alert($gameMap._events[event]._player); // prints an integer
But inside the event, I use this script call:
a = this._player;
window.open(url + a);
a is always undefined.
How do I access the _player variable I have created from inside an event, if not with this._player ?
To clarify this is what I am trying to replicate, but using the currently running event. This works:
a = $gameMap._events[17]._player;
window.open(url + a);
Thanks for your help.
I have some events which have a variable called _player. This is used to just give them an id number that associates with a player.
I do this by:
$gameMap._events[event]._player = player;
Where player is an integer.
The following works:
alert($gameMap._events[event]._player); // prints an integer
But inside the event, I use this script call:
a = this._player;
window.open(url + a);
a is always undefined.
How do I access the _player variable I have created from inside an event, if not with this._player ?
To clarify this is what I am trying to replicate, but using the currently running event. This works:
a = $gameMap._events[17]._player;
window.open(url + a);
Thanks for your help.