EDIT, here's the answer: I ended up finding what I need to in "Game_Event". The following code determined if a character is small or tall (my game uses tall characters). If an event has the note: "small", it takes up only one square in this case:
//Check if player is beside eventvar alias_AstraCat_customEventUpdateForChecks = Game_Event.prototype.update;//If an event is clicked and the player is adjecent to it, start that eventGame_Event.prototype.update = function() { alias_AstraCat_customEventUpdateForChecks.call(this); //if mouse hovering over event and event is small ('small' note is on event page) if (String($dataMap.events[this.eventId()].note) == 'small') { if ((this._x == MouseXGrid && this._y == MouseYGrid) || (this._x == MouseXGrid && this._y == MouseYGrid)) { //if player clicks if (TouchInput.isTriggered()) { //if player is adjecent to event and event is tall if (($gamePlayer._x+1 == this._x && $gamePlayer._y == this._y) || ($gamePlayer._x-1 == this._x && $gamePlayer._y == this._y) || ($gamePlayer._x == this._x && $gamePlayer._y-1 == this._y) || ($gamePlayer._x == this._x && $gamePlayer._y+1 == this._y)) { //misc checks if (!$gameMap.isEventRunning()) { if (!this.isJumping() && this.isNormalPriority()) { //start event this.start(); } } } } } } if (String($dataMap.events[this.eventId()].note) == '') { if ((this._x == MouseXGrid && this._y == MouseYGrid) || (this._x == MouseXGrid && this._y-1 == MouseYGrid)) { //if player clicks if (TouchInput.isTriggered()) { //if player is adjecent to event and event is tall if (($gamePlayer._x+1 == this._x && $gamePlayer._y == this._y) || ($gamePlayer._x-1 == this._x && $gamePlayer._y == this._y) || ($gamePlayer._x == this._x && $gamePlayer._y-1 == this._y) || ($gamePlayer._x == this._x && $gamePlayer._y+1 == this._y)) { //misc checks if (!$gameMap.isEventRunning()) { if (!this.isJumping() && this.isNormalPriority()) { //start event this.start(); } } } } } } };-----------------------
Hello there,
I've posted this is RGSS instead of javascript and mv boards because it has more to do with RGSSx.
I have a very simple question for someone that is knowledgeable in RGSS...I'm wondering where the code is for the following:
if (player is next to an event, and that event isn't running and is same level of them etc etc...) and if ('ok' is triggered)start eventI have checked in Game_Player, Game_Event....Scene_Map...but I just can't seem to find it. Here's a video of what I'm looking through.
I really can't seem to wrap my head around how rpg maker does this...
I've posted this is RGSS instead of javascript and mv boards because it has more to do with RGSSx.
I have a very simple question for someone that is knowledgeable in RGSS...I'm wondering where the code is for the following:
//Check if player is beside eventvar alias_AstraCat_customEventUpdateForChecks = Game_Event.prototype.update;//If an event is clicked and the player is adjecent to it, start that eventGame_Event.prototype.update = function() { alias_AstraCat_customEventUpdateForChecks.call(this); //if mouse hovering over event and event is small ('small' note is on event page) if (String($dataMap.events[this.eventId()].note) == 'small') { if ((this._x == MouseXGrid && this._y == MouseYGrid) || (this._x == MouseXGrid && this._y == MouseYGrid)) { //if player clicks if (TouchInput.isTriggered()) { //if player is adjecent to event and event is tall if (($gamePlayer._x+1 == this._x && $gamePlayer._y == this._y) || ($gamePlayer._x-1 == this._x && $gamePlayer._y == this._y) || ($gamePlayer._x == this._x && $gamePlayer._y-1 == this._y) || ($gamePlayer._x == this._x && $gamePlayer._y+1 == this._y)) { //misc checks if (!$gameMap.isEventRunning()) { if (!this.isJumping() && this.isNormalPriority()) { //start event this.start(); } } } } } } if (String($dataMap.events[this.eventId()].note) == '') { if ((this._x == MouseXGrid && this._y == MouseYGrid) || (this._x == MouseXGrid && this._y-1 == MouseYGrid)) { //if player clicks if (TouchInput.isTriggered()) { //if player is adjecent to event and event is tall if (($gamePlayer._x+1 == this._x && $gamePlayer._y == this._y) || ($gamePlayer._x-1 == this._x && $gamePlayer._y == this._y) || ($gamePlayer._x == this._x && $gamePlayer._y-1 == this._y) || ($gamePlayer._x == this._x && $gamePlayer._y+1 == this._y)) { //misc checks if (!$gameMap.isEventRunning()) { if (!this.isJumping() && this.isNormalPriority()) { //start event this.start(); } } } } } } };-----------------------
Hello there,
I've posted this is RGSS instead of javascript and mv boards because it has more to do with RGSSx.
I have a very simple question for someone that is knowledgeable in RGSS...I'm wondering where the code is for the following:
if (player is next to an event, and that event isn't running and is same level of them etc etc...) and if ('ok' is triggered)start eventI have checked in Game_Player, Game_Event....Scene_Map...but I just can't seem to find it. Here's a video of what I'm looking through.
I really can't seem to wrap my head around how rpg maker does this...
I've posted this is RGSS instead of javascript and mv boards because it has more to do with RGSSx.
I have a very simple question for someone that is knowledgeable in RGSS...I'm wondering where the code is for the following:
Code:
if (player is next to an event, and that event isn't running and is same level of them etc etc...) and if ('ok' is triggered)start event