New account registration is temporarily disabled.

[RMMV] UNABLE TO DISABLE PARALLEL EVENT?

Posts

Pages: 1
Okay, so in RPG Maker MV, I have tried using screen tinting and pictures to make a lighting effect in a parallel event. Problem is, I can't seem to make the event end or change no matter what switches I use. I want the lighting and tinting to change depending on whether or not I'm indoors, or whether a switch is activated or not (as if the time of day has changed in the story). Does anyone have any advice?
Well one thing I would recommend, is not to use a Parallel Event for that, as they tend to only work well for "watching" something, such as a player's location, and recording that to a variable. I'd use an Autorun instead.

I'd also make a Common Event, simply for ease-of-use in the future, for when you decide to apply these screen effects. We'll call this Common Event Common Event: Applied Lighting. In your Common Event, you'll want to add in all of your tints. I'd recommend, while transitioning from inside to outside, to make them instant (1 frame tint, for example). In this Common Event, you'll also want to set up the Show Picture event you were talking about.

When the player transfers from the door that goes from inside to outside, turn a switch on. We'll call it Switch 001: Lighting affect_Activate.

Now make an event in the exterior, one which has at least two pages. Set page 2's condition to Switch 001 is on. Set its processing to Autorun. Now program the event like this:

1. Call Common Event: Applied Lighting
2. Control Switch: Turn Switch 001 OFF.

And that should do it. That Common Event will allow you to call that event from anywhere in the game, so not just in one exterior map, but you can plop that "call Common Event" down anywhere, and it will read your lighting effects. Pretty handy.



=====



You also mentioned you wanted to change the lighting depending on the time of day. Let's take care of that with our Common Event.

Back in that Common Event, we're going to mess with some conditions. I don't know how you decide to dictate Time of Day in your game: will an event simply shift it from Morning to Night, or does it pass in real time? If it's the former, we're going to do this:

This assumes that you have made a Variable that dictates the time of day. A variable can hold a number, so we want to set our "Time of Day" to a number. Sounds confusing, but it will make sense. We're going to give this variable a value that will represent something. So we're going to make a Variable, and we're going to call it Variable 01: Time_of_Day. And we're going to have it change between 1, 2 and 3 throughout the events of the game. This is what they will mean:
1 = Morning.
2 = Mid day.
3 = Night.

So this number, stored in the Variable, can be accessed from anywhere in the game. We're going to access it from your Common Event we made earlier.

So we're going to change your Common Event: Applied Lighting a little bit. It will involve some condition branches, but bare with me. You will want to change it like this.

1. Condition Branch: If Variable: Time_of_Day = 1:
... (Insert your morning tint and picture here.)
.... ELSE
..... Condition Branch: If Variable: Time_of_Day = 2:
...... (Insert your mid day tint and picture here.)
....... ELSE
........ (Insert your night tint and picture here.)

By playing around with variables and common events, you should be able to make something easy and, well, portable, that you can re-use constantly throughout your game.




BONUS: If time passes continuously throughout the game, then you'll want to make the same Common Event as above, however, instead of having the Variable be a value of 1 2 and 3, instead have the Variable hold your "time of day" timer, and set the condition branches up to create a range.
author=Gredge109
Well one thing I would recommend, is not to use a Parallel Event for that, as they tend to only work well for "watching" something, such as a player's location, and recording that to a variable. I'd use an Autorun instead.

I'd also make a Common Event, simply for ease-of-use in the future, for when you decide to apply these screen effects. We'll call this Common Event Common Event: Applied Lighting. In your Common Event, you'll want to add in all of your tints. I'd recommend, while transitioning from inside to outside, to make them instant (1 frame tint, for example). In this Common Event, you'll also want to set up the Show Picture event you were talking about.

When the player transfers from the door that goes from inside to outside, turn a switch on. We'll call it Switch 001: Lighting affect_Activate.

Now make an event in the exterior, one which has at least two pages. Set page 2's condition to Switch 001 is on. Set its processing to Autorun. Now program the event like this:

1. Call Common Event: Applied Lighting
2. Control Switch: Turn Switch 001 OFF.

And that should do it. That Common Event will allow you to call that event from anywhere in the game, so not just in one exterior map, but you can plop that "call Common Event" down anywhere, and it will read your lighting effects. Pretty handy.



=====



You also mentioned you wanted to change the lighting depending on the time of day. Let's take care of that with our Common Event.

Back in that Common Event, we're going to mess with some conditions. I don't know how you decide to dictate Time of Day in your game: will an event simply shift it from Morning to Night, or does it pass in real time? If it's the former, we're going to do this:

This assumes that you have made a Variable that dictates the time of day. A variable can hold a number, so we want to set our "Time of Day" to a number. Sounds confusing, but it will make sense. We're going to give this variable a value that will represent something. So we're going to make a Variable, and we're going to call it Variable 01: Time_of_Day. And we're going to have it change between 1, 2 and 3 throughout the events of the game. This is what they will mean:
1 = Morning.
2 = Mid day.
3 = Night.

So this number, stored in the Variable, can be accessed from anywhere in the game. We're going to access it from your Common Event we made earlier.

So we're going to change your Common Event: Applied Lighting a little bit. It will involve some condition branches, but bare with me. You will want to change it like this.

1. Condition Branch: If Variable: Time_of_Day = 1:
... (Insert your morning tint and picture here.)
.... ELSE
..... Condition Branch: If Variable: Time_of_Day = 2:
...... (Insert your mid day tint and picture here.)
....... ELSE
........ (Insert your night tint and picture here.)

By playing around with variables and common events, you should be able to make something easy and, well, portable, that you can re-use constantly throughout your game.




BONUS: If time passes continuously throughout the game, then you'll want to make the same Common Event as above, however, instead of having the Variable be a value of 1 2 and 3, instead have the Variable hold your "time of day" timer, and set the condition branches up to create a range.


I hope I don't sound like an idiot ... but ... how do you make a variable change between 1, 2 and 3?
author=Gredge109
Well one thing I would recommend, is not to use a Parallel Event for that, as they tend to only work well for "watching" something, such as a player's location, and recording that to a variable. I'd use an Autorun instead.

I'd also make a Common Event, simply for ease-of-use in the future, for when you decide to apply these screen effects. We'll call this Common Event Common Event: Applied Lighting. In your Common Event, you'll want to add in all of your tints. I'd recommend, while transitioning from inside to outside, to make them instant (1 frame tint, for example). In this Common Event, you'll also want to set up the Show Picture event you were talking about.

When the player transfers from the door that goes from inside to outside, turn a switch on. We'll call it Switch 001: Lighting affect_Activate.

Now make an event in the exterior, one which has at least two pages. Set page 2's condition to Switch 001 is on. Set its processing to Autorun. Now program the event like this:

1. Call Common Event: Applied Lighting
2. Control Switch: Turn Switch 001 OFF.

And that should do it. That Common Event will allow you to call that event from anywhere in the game, so not just in one exterior map, but you can plop that "call Common Event" down anywhere, and it will read your lighting effects. Pretty handy.



=====



You also mentioned you wanted to change the lighting depending on the time of day. Let's take care of that with our Common Event.

Back in that Common Event, we're going to mess with some conditions. I don't know how you decide to dictate Time of Day in your game: will an event simply shift it from Morning to Night, or does it pass in real time? If it's the former, we're going to do this:

This assumes that you have made a Variable that dictates the time of day. A variable can hold a number, so we want to set our "Time of Day" to a number. Sounds confusing, but it will make sense. We're going to give this variable a value that will represent something. So we're going to make a Variable, and we're going to call it Variable 01: Time_of_Day. And we're going to have it change between 1, 2 and 3 throughout the events of the game. This is what they will mean:
1 = Morning.
2 = Mid day.
3 = Night.

So this number, stored in the Variable, can be accessed from anywhere in the game. We're going to access it from your Common Event we made earlier.

So we're going to change your Common Event: Applied Lighting a little bit. It will involve some condition branches, but bare with me. You will want to change it like this.

1. Condition Branch: If Variable: Time_of_Day = 1:
... (Insert your morning tint and picture here.)
.... ELSE
..... Condition Branch: If Variable: Time_of_Day = 2:
...... (Insert your mid day tint and picture here.)
....... ELSE
........ (Insert your night tint and picture here.)

By playing around with variables and common events, you should be able to make something easy and, well, portable, that you can re-use constantly throughout your game.




BONUS: If time passes continuously throughout the game, then you'll want to make the same Common Event as above, however, instead of having the Variable be a value of 1 2 and 3, instead have the Variable hold your "time of day" timer, and set the condition branches up to create a range.


Oh! Also, I've noticed that using an autorun even with the lighting effects makes it so that I can't move the player. So, I'm confused.
I hope I don't sound like an idiot ... but ... how do you make a variable change between 1, 2 and 3?


In your event programming list, right next to Control Switches, you have Control Variables. Click on that, and it will open a menu where you can modify a variable. In this case, think of the variable as a Switch, but instead of holding a YES or NO option, it can hold a variety of options.

You'll want to select a single variable, which will be your Variable 01, you'll want to click the option to Set the variable, and you're going to then select the next option, in the little section under there, to Constant, and then you'll want to apply the value to that variable, which will be 1, 2 or 3, depending on the time of day you wish to indicate.

So think of it like a sentence. "I'm going to take this single variable, and I'm going to set it to a constant, unchanging number, and that number will be 1, 2 or 3."




Oh! Also, I've noticed that using an autorun even with the lighting effects makes it so that I can't move the player. So, I'm confused.


Could you perhaps copy and paste a screen shot of your event programming here? I may be able to see the problem more closely. Right now it sounds as though a switch didn't go off, or that the computer is attempting to read a switch and conduct an action over and over again.
author=Gredge109
I hope I don't sound like an idiot ... but ... how do you make a variable change between 1, 2 and 3?
In your event programming list, right next to Control Switches, you have Control Variables. Click on that, and it will open a menu where you can modify a variable. In this case, think of the variable as a Switch, but instead of holding a YES or NO option, it can hold a variety of options.

You'll want to select a single variable, which will be your Variable 01, you'll want to click the option to Set the variable, and you're going to then select the next option, in the little section under there, to Constant, and then you'll want to apply the value to that variable, which will be 1, 2 or 3, depending on the time of day you wish to indicate.

So think of it like a sentence. "I'm going to take this single variable, and I'm going to set it to a constant, unchanging number, and that number will be 1, 2 or 3."




Oh! Also, I've noticed that using an autorun even with the lighting effects makes it so that I can't move the player. So, I'm confused.


Could you perhaps copy and paste a screen shot of your event programming here? I may be able to see the problem more closely. Right now it sounds as though a switch didn't go off, or that the computer is attempting to read a switch and conduct an action over and over again.


http://imgur.com/a/nuMnZ
I used imgur, is that okay?
I tried making a lighting effect that had less pictures in it than my common event, but still similar to it, to test it out inside a house. (I still want some tinting inside a house, but different from the outside) Oh, also, there was another autorun event that ran an important cutscene, and this lighting effect in question didn't even start until that cutscene started.
I'm going to try out the variable thingy. Thanks for helping out. :)
http://imgur.com/a/nuMnZI used imgur, is that okay?


Ooooh, I see what the problem is!

I have two solutions for you, one which is really easy, but won't help in the future, and one which is technical, but important to learn.

First, the easy one!

In that event you linked, add another line underneath it. You'll want to pick the command Erase Event. It's found on the 2nd tab of your event command list. Once you add that Erase Event, it will delete the event from the map, temporarily, until you exit and re-enter the map. Easy!


---

The technical solution which points out the problem.

That event page doesn't have a condition set! So when the player walks into that room, that event is constantly repeating itself, infinitely, because, to explain it in a sentence, you haven't told the computer when to stop "doing the thing".

Event pages in RPG Maker have to have a condition set to them, otherwise the engine will always run the right-most page. You haven't set a condition for that page to activate, so it will activate continually. What you''ll have to do is add a switch or a variable which indicates when the stop the event. I recommend a Switch to indicate when the player has gone indoors. Then, you can set the condition if that page to detect whether the switch is on, conduct the lighting effect changes, and then shut off the switch.

It's a bit more work to do, but the extra legwork will come in handy, the further along you get.



If that's a bit heavy, you always have the easy option above: simply add Erase Event to the event!
author=Gredge109
they tend to only work well for "watching" something, such as a player's location, and recording that to a variable. .

That's not really true. Unless things have changed in the newer RM engines, a parallel event will run along side other events while an autroun event won't. That is the important thing to remember. An autorun will prevent other events from triggering while it runs it's own code.

Oh, I see in his later reply that he says the hero doesn't move. So then it's the same and that's why you wouldn't use an autorun. I've used empty autorun events to simulate a pause, because it stops everything else from happening.

It may be that in this case Autorun is better, but it's not good to think of parallel events in that way. If you walk into a map you can have an autorun event with some code, including adding tints, then have it turn itself off so it doesn't keep running.

In the case of time of day lighting, that common event IS a parallel event. And common event is the right place for that kind of thing.
author=Gredge109
http://imgur.com/a/nuMnZI used imgur, is that okay?
Ooooh, I see what the problem is!

I have two solutions for you, one which is really easy, but won't help in the future, and one which is technical, but important to learn.

First, the easy one!

In that event you linked, add another line underneath it. You'll want to pick the command Erase Event. It's found on the 2nd tab of your event command list. Once you add that Erase Event, it will delete the event from the map, temporarily, until you exit and re-enter the map. Easy!


---

The technical solution which points out the problem.

That event page doesn't have a condition set! So when the player walks into that room, that event is constantly repeating itself, infinitely, because, to explain it in a sentence, you haven't told the computer when to stop "doing the thing".

Event pages in RPG Maker have to have a condition set to them, otherwise the engine will always run the right-most page. You haven't set a condition for that page to activate, so it will activate continually. What you''ll have to do is add a switch or a variable which indicates when the stop the event. I recommend a Switch to indicate when the player has gone indoors. Then, you can set the condition if that page to detect whether the switch is on, conduct the lighting effect changes, and then shut off the switch.

It's a bit more work to do, but the extra legwork will come in handy, the further along you get.



If that's a bit heavy, you always have the easy option above: simply add Erase Event to the event!


Thanks for the help!
author=Link_2112
author=Gredge109
they tend to only work well for "watching" something, such as a player's location, and recording that to a variable. .
That's not really true. Unless things have changed in the newer RM engines, a parallel event will run along side other events while an autroun event won't. That is the important thing to remember. An autorun will prevent other events from triggering while it runs it's own code.

Oh, I see in his later reply that he says the hero doesn't move. So then it's the same and that's why you wouldn't use an autorun. I've used empty autorun events to simulate a pause, because it stops everything else from happening.

It may be that in this case Autorun is better, but it's not good to think of parallel events in that way. If you walk into a map you can have an autorun event with some code, including adding tints, then have it turn itself off so it doesn't keep running.

In the case of time of day lighting, that common event IS a parallel event. And common event is the right place for that kind of thing.

Okay, thanks. I appreciate that bit of knowledge!
But, what about when you have a parallel event, even one with erase event in the end, and when you have a switch activated on a second page of the event, the second page's code won't work?

... I wish I hadn't deleted that stupid event when testing out the autorun thingies ... I am not bright.
author=Link_2112
author=Gredge109
they tend to only work well for "watching" something, such as a player's location, and recording that to a variable. .
That's not really true. Unless things have changed in the newer RM engines, a parallel event will run along side other events while an autroun event won't. That is the important thing to remember. An autorun will prevent other events from triggering while it runs it's own code.

Oh, I see in his later reply that he says the hero doesn't move. So then it's the same and that's why you wouldn't use an autorun. I've used empty autorun events to simulate a pause, because it stops everything else from happening.

It may be that in this case Autorun is better, but it's not good to think of parallel events in that way. If you walk into a map you can have an autorun event with some code, including adding tints, then have it turn itself off so it doesn't keep running.

In the case of time of day lighting, that common event IS a parallel event. And common event is the right place for that kind of thing.


Oh! I forgot to say this!
I'm trying to do what was explained in this short video:
https://www.youtube.com/watch?v=e9YwDmyBd0c
I even read some of the channel's comments. My stupid brain still couldn't figure it out. :P
Don't multipost. Instead, edit your previous post and add what you wanted to say to it. It's against site rules.
author=Liberty
Don't multipost. Instead, edit your previous post and add what you wanted to say to it. It's against site rules.


I didn't know that. I'm sorry. I'll stop doing that from now on.
author=HappyDannyLovely
Oh! I forgot to say this!
I'm trying to do what was explained in this short video:
https://www.youtube.com/watch?v=e9YwDmyBd0c
I even read some of the channel's comments. My stupid brain still couldn't figure it out. :P

First of all, I'd be hesitant to do lighting effects like that. The upper corner of the screen was almost pure yellow and she said it looks ok. Sorry, but no it doesn't. Many people dislike overlays like that, so I'd be careful. And that tutorial is garbage for beginners. She says "simply do this" and proceeds to do about 20 actions in the span of .5 seconds.

Also, I'm too old and tired to spend much time helping you. Sorry, bud. Perhaps if you were around 6 years ago. I would suggest that you take baby steps and learn the engine yourself before you get too complex. Read tutorials. I wrote a simple one that might help. https://www.rpgmaker.net/tutorials/842/

Experiment. Make an event and see what happens. Then tweak it slightly and see what happens. One tip for testing events, put a sound effect or message in there. If you have an event that isn't running the entire code, put in messages 1, 2, 3... throughout the event. Then as you play the game, you will see 1, 2...but no 3. So then you know that the event code is going as far as 2 and you can pin point your problem. When you start using multiple parallel events and pages, you start to run into interruptions like that.
Pages: 1