Button Press Changes Graphic

SakuraMiya

Invincible Airhead
Veteran
Joined
Jul 17, 2016
Messages
76
Reaction score
3
First Language
Spanish
Primarily Uses
For my game, I want to have a feature where pressing a button will cause the character to be invisible. It will be used to get specific items and avoid attracting enemies. Is there a script necessary that’ll change the player’s graphic when the button is pressed. Can all the sprites in the map immediately approach the player when they aren’t pressing said button? I already tried Conditional Branches, but it doesn’t work. So I’m at loss at what do. How do I start?
 

Rinobi

Veteran
Veteran
Joined
Mar 24, 2014
Messages
579
Reaction score
219
First Language
English
Primarily Uses
RMVXA
Based on your description, this does seem doable with events alone. It would've helped to show us what you've tried thus far; if only to give us more insight as to what you're trying to accomplish.

You could run a parallel process via common event which checks if a button is being pressed.
This can work as a toggle, or the button being held down based on the approach.
I've chosen the latter for the example below.
invisible_00.PNG
You can then setup your map events to check for the Is Invisible switch...
 

SakuraMiya

Invincible Airhead
Veteran
Joined
Jul 17, 2016
Messages
76
Reaction score
3
First Language
Spanish
Primarily Uses
Based on your description, this does seem doable with events alone. It would've helped to show us what you've tried thus far; if only to give us more insight as to what you're trying to accomplish.

You could run a parallel process via common event which checks if a button is being pressed.
This can work as a toggle, or the button being held down based on the approach.
I've chosen the latter for the example below.
You can then setup your map events to check for the Is Invisible switch...
Well, to be honest, I did something similar to that, but forgot not to put exceptions for the Conditional Branches. Anyway, this is really helpful and convenient, thanks a lot! It will help me progress a lot with my game. Thank you very much!

But my problem now is....how do I make the enemies approach the player if they're not pressing the Y button? I was using this stealth tutorial before, but it's still usable now that the player is invisible?
 

Rinobi

Veteran
Veteran
Joined
Mar 24, 2014
Messages
579
Reaction score
219
First Language
English
Primarily Uses
RMVXA
The answer is more or less in the question. Again, I don't know how your enemy events are setup, but the solution should be obvious from here on. It should be as simple as adding a conditional branch where you need it.

Conditional Branch: Switch[Is Invisible] == OFF
Approach Player.
Branch End
 

SakuraMiya

Invincible Airhead
Veteran
Joined
Jul 17, 2016
Messages
76
Reaction score
3
First Language
Spanish
Primarily Uses
The answer is more or less in the question. Again, I don't know how your enemy events are setup, but the solution should be obvious from here on. It should be as simple as adding a conditional branch where you need it.

Conditional Branch: Switch[Is Invisible] == OFF
Approach Player.
Branch End
Yeah, I did figure it out by myself in the end. But thanks for making things clear. You've helped me a lot!
 

Ximsol182

Villager
Member
Joined
Jun 7, 2017
Messages
13
Reaction score
1
First Language
Spanish
Primarily Uses
RMVXA
This thread helped me a lot, but I wanted to make a similar system except that it includes a gauge. This system works fine, but the problem is.....how can I make the player turn visible again after the bar goes down to 0??

stealth.JPG
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Please do not use someone else's thread to ask a different question. Things can get very confused if there are multiple queries from more than one person in the same thread.

I suggest you start a new thread, perhaps giving a link back to this one so that people can see what the background is.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top