Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

When [Direction] Change Graphic ?

Jason

Awesome Bro

Hello, I've started making a script which lets you push boulders (APE doesn't work for me), but what I need to know is, how can I make it, so that if a Direction is pressed, the character graphic will change and then after it's been pushed, change back to the last graphic it was on ?

If this didn't make sense, please say and I will try to simplify it.

Thankyou.
 

arev

Sponsor

I assume it's for the player, use
Code:
$game_player.direction == x
conditional branch. Replace "x" with the value of the direction you want to test (2 - down, 4 - left, 6 - right, 8 - up).
 
To change an event graphic with script, you need to add the following to Game_Character 1, below all the other "attr_accessor"

Code:
  attr_accessor :character_name
  attr_accessor :character_hue

Now you can use the following script call.

Code:
  $game_map.events[event_id].character_name = 'filename'
  $game_map.events[event_id].character_hue = 0..360
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top