Status
Not open for further replies.

Arisete™

Creator
Veteran
Joined
Jul 14, 2012
Messages
231
Reaction score
63
First Language
English
Primarily Uses
RMMV
Hey guys, I been messing around with the default directions in the script, however I cannot figure out how to disable
the following (Facing Down) Sprites, and the (Facing Up) Sprites.

My game uses only left and right sprites while still able to move up and down.

Basically my movement needs to be like "Dungeon Fighter Online"

Example of moving Left,Right,Up, and Down.







If the character is facing left, and I move up, then I want the character to still be facing left while moving up, if I turn right while moving up I'll still be facing right.
I hope that is enough details on what I need.

Thanks.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,344
Reaction score
15,158
First Language
English
Primarily Uses
RMMV
If you want this to apply ONLY to the player, add this in a new script slot:

class Game_Player < Game_Character def set_direction(d) super(d) if [4,6].include?(d) endendBut if you want it to apply to ALL characters (player, followers, events, vehicles), add this instead in a new script slot:

Code:
class Game_CharacterBase  alias shaz_sidedir_set_direction set_direction  def set_direction(d)    shaz_sidedir_set_direction(d) if [4,6].include?(d)  endend
 
Last edited by a moderator:

Arisete™

Creator
Veteran
Joined
Jul 14, 2012
Messages
231
Reaction score
63
First Language
English
Primarily Uses
RMMV
Thanks this is perfect, I don't think I need it for anything else but the Player.


But in case I do, is there a way to use them for only certain stuff?

Example: Maybe use the [4,6] directions for Player, and Events, but not Airship/etc?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,344
Reaction score
15,158
First Language
English
Primarily Uses
RMMV
If you want it for player AND events, but not for vehicles or followers, use this:

Code:
class Game_Player < Game_Character  def set_direction(d)    super(d) if [4,6].include?(d)  endendclass Game_Event < Game_Character  def set_direction(d)    super(d) if [4,6].include?(d)  endend
 

Arisete™

Creator
Veteran
Joined
Jul 14, 2012
Messages
231
Reaction score
63
First Language
English
Primarily Uses
RMMV
Alright, everything works absolutely perfect.
Thanks Shaz.

You can close this.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,344
Reaction score
15,158
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Changed my avatar, goodbye Alan Sugar, hello George Carlin (one of my favorite human beings ever)
If you still don't subscribe our Polish channel please consider it :)
1.png
Who wants to see my review of the worst star wars movie? This movie has all the excitement of being on Jury Duty of the most boring case ever about trade negotiations.
A lot to learn to make a game. Can I handle it?
I've been working on status effects since last thursday, and today I finished the core mechanic of Zombie, Teleport, Curse and Recall. Zombie and Curse are lacking a few things to make them complete atm. Teleport though is the "HAHA" spell for some of my mobs, but can "NOPE" at them with Recall.

Forum statistics

Threads
115,169
Messages
1,087,780
Members
149,711
Latest member
GHench
Top