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.

[VX] How to show character specific images on screen

ikos

Member

Alright, let's see if this makes sense:

I want to display images on the screen (during regular overworld gameplay) that is character specific. So, my first action was to use draw_character_picture(@actor.name,x,y). However, I already use that specific name for another picture on the character status menu.

My first instinct was to try something like @actor.name_1, however, that didn't seem to work. Any ideas on what I could do?
 
If you want to set it up like that, you can create a variable, set it equal to '1' or '_1' (including quotes)
and use the code like this
draw_character_picture(@actor.name + var,x,y)
or without the variable (@actor.name + '_1',x,y)
The variable would let you dynamically change the name though if you needed to
 

ikos

Member

Beran":1cazwfp0 said:
If you want to set it up like that, you can create a variable, set it equal to '1' or '_1' (including quotes)
and use the code like this
draw_character_picture(@actor.name + var,x,y)
or without the variable (@actor.name + '_1',x,y)
The variable would let you dynamically change the name though if you needed to

What do you mean by including quotes?
"Controlling Variables [001: HUD Image Variable] = 1" isn't good enough?
 
He meant an RGSS variable. Making it a string and using + appends it to the end of @actor.name, so you could essentially show images dynamically by setting the variable to which actor's pic you wanted.
 
That pretty much covers what I meant :P
Using control variables, you can't create a string. That's why I suggested using an RGSS variable instead.
EDIT: And by "including quotes" I meant that you also write the quotes outside of '1' and/or '_1'
 

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