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,657
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,657
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.
 

Latest Threads

Latest Profile Posts

When you have your friend over and you try to have a good time and let him try your game but he legit finds 10+ bugs that you now have to add to your already big workload for the day lol.
Zaj
Okay anothe stupid question from me. Why is when everyone's explaining the scripts in the scriptlets, it chnge into green. how do i know when do i code without knowing whether its turning green or not
So I realized that I really just don't have enough time to make videos. However I don't mind clicking stream and just letting people watch me work on my game. I don't really have a good microphone... okay it's a $20 headset so it's terrible, and I have no web cam. So the stream would largely be royalty free music and me working, with minor interaction. I guess the question is, would that actually interest anybody?
Child base test two, flappin' their arms like it's VX Ace.
ChildTest-02.gif

Forum statistics

Threads
111,325
Messages
1,060,207
Members
144,641
Latest member
Shooleam
Top