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.

Changing Between Charactersets Without Specifying a Frame

mawk

Sponsor

I suppose the title's making a lot of people go "uh... what?" and make blinky eyes at the screen right about now. I'll try to explain things a little better than I have in the title.

You all know the Change Graphic command, right? A little screen pops up, and you get to choose the characterset as well as the particular frame on that 4x4 grid that you'd like.

What I'd like is to be able to change the characterset that an event uses, without changing the frame it currently occupies.

Let's say a ghost is walking downwards when this script is used, and it catches him with his right, er, flap of cloth extended (an action which is symbolized by the second frame on the first row of the characterset.) He turns into a robot. Now, the user only specified the robot characterset to be used, but the robot is also facing down with his right foot extended -- the second frame on the first row.

Ideally, this would be in the form of a call to that script, without changing the actual "Change Graphic command at all. In the call, I should be able to specify the new characterset -- I may or may not need to specify the event which I am changing (as I plan to use this script only in Move Routes, which are already specific to a single event.)

Also, it's gotta be compatible with isometric charactersets as they're presented by f0tz!baerchen's Pixelmovement Script, which can be found through his topic: http://www.rmxp.org/forums/index.php?topic=624.0

Thanks in advance to anyone who's willing to put the time into this request. If you don't quite understand something that I've said, or would like more detail in a certain area, please tell me!
 
I am not 100% sure on what you are asking but...

Go into Game_Character, and change
Code:
  attr_reader   :character_name           # character file name
to
Code:
  attr_accessor :character_name           # character file name

Then all you have to do is call:
Code:
$game_map.events[event_id].character_name = 'filename'

That may be what you are asking...
 

mawk

Sponsor

If this works, it's a whole lot simpler than I'd thought. I'm sort of embarrassed. Partially because in two paragraphs I didn't manage to define exactly what it is I wanted. I think you still got it right, though.

I'll check it out once I have a chance. Compatibility with f0tz' script is the one thing I'm a little worried about, but it might just as easily not be a problem at all. Thanks a ton for taking this on (and promptly shattering any predispositions I had about scripting!) : D
 
lol No problem. It should work, as all this does is change the character_name. Hell, chances are you don't even have to change the attr_reader to accessor, as my guess is fotz! may have done it in the script already (but I would still do it, just in case).

And if this isn't what you are asking, I'll continue to help until we get this right. lol
 

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