Character Direction checking? (script)

Isabella Ava

Veteran
Veteran
Joined
Sep 13, 2016
Messages
635
Reaction score
756
First Language
English
Hello, i tried many different expressions but i can't find anyway to get character direction (player/event)
I know this can be done via Condition Branch but i want to do it via Script because i have bunch of another scripts there

All of these didn't work, please HELP T.T i am out of ideas
function(character) {character.direction();}
this.direction();
$gamePlayer.direction
Thank you,
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
$gameParty.members()[0]._direction returns leader's direction.
$gameMap.event(1)._direction returns event 1's direction.
 

Isabella Ava

Veteran
Veteran
Joined
Sep 13, 2016
Messages
635
Reaction score
756
First Language
English
Thanks @Poryg, event scirpt worked but $gameParty.members()[0]._direction return undefined

Btw i want to ask that i did see "this._direction" while checking data files but how did you know
to replace "this" with "$gameMap.event()" :|
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
Oh, sorry, my bad.
$gamePlayer._direction returns player's direction.


Btw i want to ask that i did see "this._direction" while checking data files but how did you know
to replace "this" with "$gameMap.event()" :|
Object oriented programming in short.
I can't teach you knowledge about programming languages here, since it's got nothing to do with teaching stuff about RPG maker. If you want to, take a look at object oriented languages like C#, C, C++ or Java. Sololearn has free lessons for these languages.
Object oriented programming has same logic regardless of programming language, so even if you learn about C++, the same logic is applicable to Javascript's object oriented programming.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top