- Joined
- Mar 2, 2012
- Messages
- 41,298
- Reaction score
- 14,275
- First Language
- English
- Primarily Uses
- RMMV
I don't think so, because what we're referring to here is what comes out of the json files (which don't have a leading _), not the variables as defined in the rpg_objects.js (which do):
"events":[
null,
{"id":1,"name":"EV001","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"!Other1","direction":2,"pattern":0,"characterIndex":6}
This is the code that sets up the current page based on the information at the indexed page. What we're trying to do is change the indexed page, not the current page. It uses this.page().image.characterName and this.page().image.characterIndex - we're just using this.pages[id] instead of this.page but the image.characterName and image.characterIndex are the same.
"events":[
null,
{"id":1,"name":"EV001","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"!Other1","direction":2,"pattern":0,"characterIndex":6}
This is the code that sets up the current page based on the information at the indexed page. What we're trying to do is change the indexed page, not the current page. It uses this.page().image.characterName and this.page().image.characterIndex - we're just using this.pages[id] instead of this.page but the image.characterName and image.characterIndex are the same.
Code:
Game_Event.prototype.setupPageSettings = function() {
var page = this.page();
var image = page.image;
if (image.tileId > 0) {
this.setTileImage(image.tileId);
} else {
this.setImage(image.characterName, image.characterIndex);
}
if (this._originalDirection !== image.direction) {
this._originalDirection = image.direction;
this._prelockDirection = 0;
this.setDirectionFix(false);
this.setDirection(image.direction);
}
if (this._originalPattern !== image.pattern) {
this._originalPattern = image.pattern;
this.setPattern(image.pattern);
}
this.setMoveSpeed(page.moveSpeed);
this.setMoveFrequency(page.moveFrequency);
this.setPriorityType(page.priorityType);
Last edited by a moderator: