Boss battle start

OK, let me explain…

In my game, when you touch an enemy in the overworld, it takes you to a battle scene.

Here are the events:

in collision

Battle start (Note: the “Encountered” Boolean is changed to true at the beginning of the battle scene)

After battle

ALL of this works perfectly.

As for boss battles…

When you talk to an NPC, and the the command “bossstart” is called at the end of the branch, It’s supposed to transition into the boss battle scene.


But I don’t know what conditions to put in so that it only changes the scene for when the transition effect ends at this moment.

For some off reason, when the paint effect ends, the “paint effect ended” condition is true forever, instead of being true for a split second like the “at the beginning of the scene” condition. I think that might be a bug that needs fixing.

What should I do?

1 Like

Delete transitionpainter just before you change scenes. Recreate it when you need it.

Ok, but can you contact the creator of the transition painter and tell him about the condition bug?

I don’t know who the creater is.

But looking at the extension, you can modify it yourself as you have it installed. I think it may just be a matter of adding the following 2 actions :

As a side note: There’s a chance the events aren’t triggering how you expect, if any of your events are using “at the beginning of the scene”, since you’re using "Pause the scene and start “battletest”, none of those events will fire again once you come back to this scene. Because the scene hasn’t started. It has resumed.

In those cases you would need to use the “OR” statement, and use both “At the beginning of the scene” as well as “Scene has just resumed” conditions.

If you’re not using “at the beginning of the scene” for any of your events here, disregard.

Edit: also you absolutely always want a trigger once ANY time you are dealing with change scene events at all. I’m unclear if it is ontentional or not, but the engine will not change scenes of the action is repeatedly called over multiple frames. Having it without a trigger once can cause issues.

I tried what you suggested, but it didn’t work. :neutral_face:

What else should I try?

Which suggestion - deleting the transitionpainter or modifying the extension?

Modifying the extension.

Ok, I wasn’t sure if it would, I thought it may. But does deleting it and then creating it as needed work? If so, stick with that method.

I haven’t tried it yet. I’ll test it out when I get done with work for the weekend.

So I tried having it so that every time the transition effect ends, it deletes the transition painter object, and then immediately create a new one after that.

But it didn’t work. What else should I try?

Hmmm, not sure. I’m in the final stages of my GameJem.js entry, I’ll have a look at this issue when I’ve finished.

I’ve made a little test project, and I cannot replicate your issue. My events look like :

At the start, the screen is green (“0;255;0”). I press space, and the black 'curtain ’ drops. Then the screen turns red (“255;0;0”). When I press ‘a’, the screen goes back to green.

So my thought is that you have some logic that isn’t right. I’d suggest against creating the transitionpainter until it’s actually needed, but that shouldn’t be the problem.

Maybe you could share a few more events that deal with the transitionpainter objects. there might be something else going on.

The transition effect also applies to transitioning to other scenes.

External events:

Scene Events:

Also the effect applies at the beginning of the scene.

(there’s a text that briefly shows up on the screen displaying the name of the room they’re in.)

I am relatively new… , but in first image you put “Encountered” in Blooleano Variable, BUT in the second put “Encounterid”!!!
In other post One person wil had problems for hours, because 1 letter changes all!
Make me know,when you Solved!!

I think they’re different variables - one to flag there was an encounter (it’s a boolean), the second to to hold the identity of what was encountered (it’s a number).

@takratzer, just posting the individual events doesn’t really help much. It doesn’t show the logic involved, just some isolated set of and event’s conditions and actions… If there’s a logic problem, we need to see more of the events. PM me with the project if that suits, and I can see if I can work out the issue.

Also, I missed this bit in your first post :

You should not be changing scene in a Repeat loop, and it should have a trigger once in the condition. It is asking for trouble otherwise.

There’s no need to iterate over every instance enemiesgeneral in a few of the other screen snips either.

As a rule of thumb, only iterate over a group of objects if there is a need to change or access something that’s specific to each object. Otherwise, drop the repeat for object and just have the conditions.

I didn’t realize I forgot to put in a trigger once. thanks for pointing that out.

Thanks for also pointing out the grouping issue, I fixed that too. :+1:

But how do I PM someone?

One way is to click on their avatar and click on the “Message” button in the top right of the popup. It looks almost like a thread, but has the letter icon in the top left along with the words “Start message”

General note: I’m seeing folks put [NOT RESOLVED] or similar on their thread titles. Please avoid this in the future. I’m removing this from the forum threads I’m seeing it on and leaving this general message on each one.

We only need “Solved” added to the thread title when it is solved, and in most cases that’ll be added by the mod. Changing the title to [NOT RESOLVED] doesn’t bring in new people to threads and can be interpreted poorly depending on the viewer. Thank you!

Oh, I see. I added it because I was worried people would think it was already resolved without opening the post.