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.

Order of events: Variables HELP!

Alright so I'm trying to get an event cutscene to happen AFTER I sleep in an inn for the night.. but only be able to be activated after that.(e.g. can walk over that event square and nothing happen until I come back out and walk over it again AFTER sleeping in the inn.) and only have the charaters involved show up AFTER that night in the inn as well.. I HAD it perfect lol, I'm just not used to doing it (first cutscene) so I think I tinkered with it on accident and can't figure out how to fix it back the way I had it.

meh.. any help? lol  :dead:

Thanks..

Drerius.
 
It would be easier to do this with switches, rether than variables.

When they go to bed, activate a switch. Create the event that will cause the charcters to show up, and on the second event page, check the check box for the switch on the right an select your switch.

It's worded a little funny, but that's the easiest way to do it that I can think of.
 
I created a switch when they go to bed.. and it activates a fight scene cut scene.. if that makes sense.. the only thing is that the cutscene activates when you walk over it before you get to the inn.. meaning I need to make it to where it activates afterwards.. I think I need variables.. I just don't know how to use them fully lol..

:dead:
 
Yes, I just don't understand how to use variables on the event pages fully.. it's soo confusing to me like how to make one thing happen by activating a variable and what event tab to place it on.. and all that lol.
 
Drerius, I did this for you in your game demo.  If you're still having trouble, let me know.  Just make sure that you add the conditions for those guys fighting.  Set it so they only appear when that switch is activated.  So make one blank event page, then make a second one with your switch as the condition.  Do the same for the player touch that activates the fight scene.  That might help.  Good luck, man.
 
Alright, now I have it to where I walk by before getting to the inn and the event triggers... but the guys are invisible...

don't I need variables for this? lol. (the after the inn thing.)


I completely got the npc that gives me armor and weapon fixed hehe, thanks again! :P
 
Nope. Variables are dimmer switches, remember?  Switches turn the lights on and off.  Variables will change things depending on how many you have.  There are only two positions for your fighter guys... either fighting or not fighting OR visible or not visible.  Nothing in between, so you don't need variables at all. 

Just make two even pages on each npc and two on the trigger next to the bridge.  One page do nothing, the next page set the condition to be a switch.  That way, the only way the second pages can be activated is after you've turned the switch on in the inn.  It seems really complicated til after you've played with it a long time.

I'm working on a pet system where you start with a baby dragon or a phoenix and you can feed it different things and train it and play with it and such to help it grow.  Then you can battle other pets with it.  This is where it gets complicated and where variables really come in handy.  See, I've made it so if you feed it enough of one type of food, then the pet will turn into an ice dragon/phoenix.  And vice versa with fire.  I couldn't use switches here because the game would never see how many of which item i've fed it.  So it would never determine which kind was fed most, meaning I couldn't ever let the pet grow up at all, let alone evolve into fire or ice. 

Drerius, did you get your game back?  I sent it to you somewhere....

Here's the link again. http://www.megaupload.com/?d=V4DHJDK0  Read the sign outside the inn.  Twice!  Then walk inside and get a room.  If you have the money, you can stay and once you walk outside, you'll see how to get your npc's to appear once a switch is turned on.  I used really pathetic demo though... lol.  Feel free to laugh and point.
 
Whew! After so much messing with it.. I'm still a BIT confused.. once I slept in the revised inn, and came out THEN the cutscene started, although I could not see anything that made it wait until I walked out the door....

I tried the same exact set up(parallel process and all) and as soon as I wake up and say goodbye to the inn keeper the cutscene starts inside the hotel even though I'm nowhere near the bridge....

I'm going to bed, please reply when you can, I will get it tomorrow.

Thanks for your time, you're alot of help no kidding.
 
Okay, this is what you have to realize about events.  It's all logic.  100% pure logical thinking makes it all work out.

Conditions are a BIG part of making them work.  I think you've got your conditions working, but you have your cutscene as a common event.  Which is fine, but it's almost overdoing a simple little common event.  Usually common events are done for... random weather effects, or... day/night system and other things that can happen inside or outside the inn.  But your cutscene only needs to happen outside, so common events don't NEED to be used.  However...

I think what you're doing wrong is that you flip the switch for the common event in the inn.  Where you need to flip a "pre cutscene switch"  This switch will make the player touch tile below the bridge active.  So that way, when you walk across the bridge again, it will activate and the cutscene will start.  See, what you're doing is flipping the switch in the inn, which makes the common event start as soon as it can.  And it will probably loop over and over too, unless you used a "control switch == off" at the end of the common event scene. 

Does that make sense at all? lol.  It is confusing, but if you break it down into small bits of logical eventing, then it's pretty easy to understand.  You just have to clear your head and walk through it from beginning to end.
 
Okay, it makes sense mostly, only where do I flip the switch for the cutscene? Yes, I flipped it in the inn.. where is the correct place and time to flip it and place it? lol.
 
Alright, so I got it SOMEHOW to where it activates the cutscene AFTER I walk out of the inn.. still too soon though. I need it to activate when I touch that tile by the bridge. lol. I don't know what I did to make it activate AFTER I walk out of the inn instead of when I finish talking with the innkeeper.. doesn't make sense because the event switch is after I wake up from sleeping... what's postponing it? How can I make it postpone it longer? How do I make it not activate until I hit that event tile at the bridge?

Thanks lol, this is frustrating to learn but I'm sure it will go smoothly after I get going. haha.
 
Okay, here's a step by step tutorial.

1.  Make an event for the innkeeper.
1a.  In this event, make your character sleep, restore hp, and turn "cutscene1" switch on.

2.  Make two events for your two fighters.    Make sure you do two separate events, and each has their own pages.  (copying the first event will work. Just make sure you change the graphic, and leave the first page's graphic blank
2a.  On the first page, do nothing.  Leave it completely blank.  Do not use a graphic.  Do not set a condition. And do not collect 200 dollars.
2b.  On the second page, (on the left side) set the condition to "cutscene1"  so this page will only appear when "cutscene1" is on.  So AFTER the inn. Set this to Parallel, so it will happen as soon as you enter the map
2c.  Make a THIRD page.  On this page, set the condition "cutscene finish" switch. (You'll need to make another switch for this, probably.)  In this page, you'll make the events do whatever happens AFTER the cutscene.  So... if you want them to disappear, then you leave the pages blank.  COMPLETELY BLANK.  If you want one of the events to approach and attack you, then do this here.  If they approach and attack you, set the trigger to parallel.  If the events are randomly walking around and you want to be able to talk to them, then set their triggers to action button.  They'll still move randomly, but won't automatically just start talking.

3.  Set up another event below the bridge that will trigger the cutscene.
3a.  The first page in this event will be blanke.  100% blank.  No conditions.
3b.  The second page, set the condition to "cuscene1" 
3c.  Also on the second page, set the trigger to player touch.  then for your commands, either call the common event that runs the cutscene, or flip the switch "cutscene2"  After you flip this switch, turn the "cutscene1" switch OFF.

OPTIONAL 3d.  IF YOU USED A COMMON EVENT:  Do nothing.  Do not make a third page on the event near the bridge.
IF YOU MADE YOUR CUTSCENE WITH THE EVENT ON THE BRIDGE:  Make a third page.  This page will run the event once you've stepped on the tile and flipped the "cutscene2" switch. 
3e.  On this third page, use parallel process triggers, and set the condition to "cutscene2"  After the cutscene is concluded (before the approaching enemy happens) turn the "cutscene2" switch off.  Turn the "cutscene finish" switch on.
3f.  Make a fourth page.  On this page, set the condition to "cutscene done" Set the trigger to action button and that way, nothing will happen when you walk over it, or press the action button on the event.  It will just be blank. 

OPTIONAL 4.  If you used a common event to run the cutscene, you need to make sure that this common event uses a parallel process and is triggered by "cutscene2"  If not, the cutscene won't work.

this will activate the approaching fighter event, and deactivate the regular cutscene events.

Okay, that SHOULD be rather simple to follow.  It's more confusing when you're not actually doing it, and just typing it out... but hopefully you'll understand.  You have to use multiple switches if you want separate things to happen. 

You want the fighters invisible (takes no switches)
You want the fighters visible (takes 1 switch)
You want the fighters to fight (takes another switch)
You want the fighters to stop fighting and fight you (takes another switch.)

  Don't forget to turn switches off, or the events won't happen like you want.  And also, make sure your event pages are in the correct order (sometimes you'll ned to copy and paste them around) or the events won't run like they're supposed to.
 
:lol: ABOUT TIME! HAHA! EVERYTHING WORKS PERFECTLY!!!! THANK YOU!!! I appreciate your help SOO MUCH! Now, I think I have a better understanding on how to work them (almost perfectly after I study the completed scene I made a little more) hehe, you're awesome help thanks!

Now, I need to go through and fully understand conditional branches and how to work them (I have one event npc where it works perfectly but I dont' remember exactly how I did it lol.
 

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