- Joined
- Mar 17, 2018
- Messages
- 1
- Reaction score
- 0
- First Language
- English
- Primarily Uses
- RMMV
Hi,
I'm trying to create a stealth tag event system as the title says, where the event will wonder the map until it sees you, then it'll chase you and catch you.
I found this thread which I've based my code on, translating the code for RMMV: https://forums.rpgmakerweb.com/index.php?threads/direction-based-line-of-sight-events.3452/
My current problem I'm having is a SyntaxError: Unexpected end of input and I'm not sure what to do.
I've included a screenshot of the console when the error occures.
This is my first time posting, so apologies if this is in the wrong section.
What I've got...
I'm trying to create a stealth tag event system as the title says, where the event will wonder the map until it sees you, then it'll chase you and catch you.
I found this thread which I've based my code on, translating the code for RMMV: https://forums.rpgmakerweb.com/index.php?threads/direction-based-line-of-sight-events.3452/
My current problem I'm having is a SyntaxError: Unexpected end of input and I'm not sure what to do.
I've included a screenshot of the console when the error occures.
This is my first time posting, so apologies if this is in the wrong section.
What I've got...
Code:
function getEventId() {($gameMap.event(this._eventId).x - $gamePlayer.x).abs <= 1 && ($gameMap.event(this._eventId).y - $gamePlayer.y).abs <= 3 || ($gameMap.event(this._eventId).y - $gamePlayer.y).abs <= 1 && ($gameMap.event(this._eventId).x - $gamePlayer.x).abs <= 3
Code:
function getEventDir() {$game_map.event(this._eventid).direction == 2 && $gameMap.event(this._eventId).y < $gamePlayer.y || $gameMap.event(this._eventId).direction == 8 && $gameMap.event(this._eventId).y > $gamePlayer.y || $gameMap.event(this._eventId).direction == 4 && $gameMap.event(this_eventId).x > $gamePlayer.x || $gameMap.event(this._eventId).direction == 6 && $gameMap.event(this._eventId).x < $gamePlayer.x}
Code:
function oneBlockCheck() {(($gameMap.event(this._eventId).x - $gamePlayer.x).abs + ($gameMap.event(this._eventId).y - $gamePlayer.y).abs) == 1}
Attachments
-
48.9 KB Views: 1
-
76.3 KB Views: 5
Last edited by a moderator:

