1. How do I log the player's "event id" or make it return 0 or -1 because right now it logs the player as undefined.
Since the player isn't an event, it doesn't have an event ID. A quick and dirty solution would be to modify your function like this:
JavaScript:Game_CharacterBase.prototype.setMovementSuccess = function(success) {
AErewindLog.unshift([this._eventId || 0, this.x, this.y]);
};
However, it's really considered to be poor programming practice to be referencing a potentially non-existent descendant property from within the ancestor class like that. Supposing that you want anything that's not an event (i.e. player, followers, and vehicles) to use an ID of 0, and you want events to use their actual event ID, then the most proper solution would be something like this:
JavaScript:AquaEcho.Rewind.Game_CharacterBase_setMovementSuccess = Game_CharacterBase.prototype.setMovementSuccess;
Game_CharacterBase.prototype.setMovementSuccess = function(success) {
AErewindLog.unshift([0, this.x, this.y]);
AquaEcho.Rewind.Game_CharacterBase_setMovementSuccess.call(this, success);
};
Game_Event.prototype.setMovementSuccess = function(success) {
AErewindLog.unshift([this._eventId, this.x, this.y]);
AquaEcho.Rewind.Game_CharacterBase_setMovementSuccess.call(this, success);
};
(In your script, you're aliasing the function, but you never actually call the alias. I'm assuming that you intended to call it, so I went ahead and added that in.)
2. How do I call the function to rewind time from the Game Interpreter (or an event page or common event page)?
Does ATT_Turan's syntax correction resolve this question for you, or do need further assistance with it?
*edit* Corrected an issue with my script.