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.

Question re: Changing character graphic

Hello.


When my intrepid thief steals the sleeping guard's cloak and helm, he can sneak into the castle.
Can anybody tell me how to set it so equiping the guard's uniform changes the character graphic?
(I'd also like de-equiping the item/s to change the graphic back.)

thanks.
 
I'm here giving Event command solutions-- scripting something like this is possible, but I'm no scripter.

Anyway, there are three likely solutions here:

1) A parallel-process common event that checks if the item is equipped, and uses Change Actor Graphic to, well, change the graphic. This will be a Conditional Branch, so the same event will handle both ends of this.

Of course, doing these things too much will lead to lag. So, instead, you could always try...

2) Making the item something that you can Use to Change Actor Graphic, and Use again to change back. (You'll toggle between states with a Switch, but that's pretty clear, because you need that Switch anyway so that it actually means something when the character is disguised besides just changing graphics, right?)

Or even

3) Going all FF VI and making the option to disguise oneself an option that pops up automatically after defeating a guard. Least flexible, but I thought that I'd mention it.
 
hmm.

Still struggling with this.
I've created a 'common event' which will change the character graphic. I think I can figure out how to change enemy behaviour towards the player when he is wearing the uniform.

So;
how do I link the common event to the player donning the uniform?


meas

an Madra Dubh
 
By using one of the methods that I described, or else a script for it.

Either a Parallel Process event that checks what the character has the item equipped, or an item that is used instead of equipped, or cheaping out and just making it an in-game event.
 
...ok, almost there!

I've got it so player can change in and out of the uniform, and the enemy guards react differently. Neato!
There's an odd wee glitch though. After changing once or twice, Player is suddenly carrying 84 and then 99 of his own clothes! Harmless enough I suppose, but strange. Any idea why?

The set up is thus:

Common Events
001: disguise_1


@>Change actor graphic: [Tomás], 050-Soldier02,0,...
@>Change Items:[Tom's coat], +1
@>Change Items:[Soldier's coat], -1
@>Control Switches: [0001:disguise_s] = ON


Common Events
002: End_disguise_1


@>Change actor graphic: [Tomás], 050-Thief02,0,...
@>Change Items:[Soldier's coat], +1
@>Change Items:[Tom'scoat], -1
@>Control Switches: [0001:disguise_s] = OFF
 
Odd-- it suggests that the event is cycling repeatedly. Is it necessary to have the Change Items part of the code? Removing that would solve the problem, of course. It also suggests that the events are cycling more than once when you run them.

If you could post a screenshot of the entire event code, that would help.
 
That's all right-- I could read the important parts well enough, so my ignorance of, uh, Gaelic? didn't matter.

Yeah, the issue is probably the Parallel-Process nature of the event-- a Parallel-Process event will keep cycling indefinitely, so it'll keep adding and subtracting items until made to stop.

Is it necessary to have the event add and subtract items? That seems to be the issue here.

Also, the second event appears to have an unnecessary Control Switches command-- it's not necessary to turn Switch 001 ON if the Condition for that event it Switch 001 ON, because Switch 001 has to already be ON for the event to process.
 

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