RPG Maker Forums

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...
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}

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,476
Members
137,824
Latest member
dobratemporal
Top