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.

Conditional Branch if Skill is used ?

Jason

Awesome Bro

Hi,

So I want to know, how would I go about making a conditional branch = if [skill] is used ? Cause there's only one for skill learned,

Thanks.
 
Call a common event from the skill, and set a variable or switch in the common event.

Then, in your battle event, check to see if the switch is set, if it is, the skill was just used.

Or, you may be able to just put your event commands in the common event. (not sure what you want to do here)

Be Well
 

Jason

Awesome Bro

Hmm I don't think I explained it good enough, let me try to explain some more...

So my character is in a dark room, I have a skill called "Light", and when it's used, the area will light up (Revealing the room), how would I make a conditional branch, to show that the skill has been used in that room?

I guess I'd have to do it with a switch or variable, but it'd be nice if it could be done as I want.
 
That all depends on how you are turning on the lights. If you have used "Screen Color Tone" to make the room dark, then just call a common event from your skill, and set the color tone back to (0, 0, 0, 0). If the player uses the skill in a normal room, it won't matter, he will just waste SP.

If you have used a dark picture or fog, same deal, use the common event called from the skill to turn off the picture or fog.

There is no way to check in a conditional branch to see if the skill "has been used". You would need to set a switch or variable one way or another to indicate that the skill had been used. then check the variable or switch in your conditional branch.

If you want to leave the lights on in that room even after the player leaves & comes back, you'll need a switch for each room.
 

Jason

Awesome Bro

Lol you know what, you're completely right there....

I don't know why I didn't do that in the first place, maybe it's cause I'm dead tired and was hoping to make things easier for myself, haha (Kind embarassing for me cause I'm a master of Events :biggrin: )

Okay cheers, this can be closed now.
 

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