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.

I have another question!!!

Okay, can some one give me an step by step explanation on. How can I make it so that once one part of the game is done, it unlocks another event.
 
Switches yes (Thats what I use but something keeps going wrong), variables NO, can you explain variables to me, plz.

Oh and I still want a step by step explanation of how to use switches.
 

Mean1

Member

Basically you set up a switch like a person saying the same phrase over again (Or in my case some one kept giving me the same item over and over again when you were only supposed to get one) Ok here we go.

So the event you said that unlocks another event this is what you do. Go to the even that just ended and right click and then edit. go down to the end of the sripting you have there and make a new line (or right click and click insert) and go to Control Switch. This brings up a box that has a drop down box. Click on the drop down box. Ok this is where it is done.
Click on a space on the right that does not have a name and name it the event that you want to trigger. Then hit ok then ok again. (almost done) Now go to the event that you want to be triggered and edit it. when the screen first pulls up look to the left and you should see a box that says conditions. Click on switch and choose the switch you just named. And there you go. That ends the other event and starts the new one! Make sure you hit aply then ok then savce the whole thing.
 
Okay, variables.

You can set a variable in these games to be equal to a huge variety of things-- the X or Y position of a character or event, a random number, a specific number, the terrain tag of the terrain the character is standing on, almost anything.  (You do this with the "Control Variables" command in XP.) 

You can then manipulate those variables (Adding one to a chapter count periodically, for example, or subtracting an enemy's position from a player's to find the range between the two of them.) 

You can also make conditional branches, or set the page conditions for an event using them.

For example, let's say that in my game, I want the town guard, who's an incredible gossip, to comment on what's going on in the game at all times when you talk to him.  I'll give his event a lot of pages, and have the condition for each page be the "Chapter" variable.  Now, whenever a major event happens in the game, I'll increase the "Chapter" variable by one, and he'll say something about the recent events when you talk to him.

Is that at all clear? 
 

Mean1

Member

so it is kinda like a switch only more elaborate and more complex but can do so much more. Cool Im gonna start using variables now. I never knew what they are for. Thanks Unka Josh
 
Gwarrior, did this explain what was going wrong?  Unka explained variables in a lot of detail.  I mainly use switches for things like... sneaking skills, or day and night, or quests.  But variables I use a lot more often for things like... "pick 10 flowers and bring them back to me"  When you click a flower, you get +1 flower in your variable, so you don't have to make a million items for simple quests like that. Then if your flower variable is == 10 you can turn the quest in.  That's just a simpler way to understand variables, in case Unka was over your head. (Almost confused me a few times. XD)

However; switches are what you'll most likely be using for your different events.  Just make sure you use control switches when needed, and don't forget to set the conditions on your new events, or they'll work regardless.  Good luck!
 

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