Hi there! I am trying to create a minigame using an event and I am running into some trouble. I want a simple minigame where a player has to move a nose away from bees that are coming out of some flowers. Basically, a bee will shake back and forth and then fly upwards from one of three flowers, and the player will use the arrow keys to move the nose left and right to try and dodge the bee.
I have a basic version of this minigame made using an event, but it has two problems. The first problem is that it starts to lag the game when it runs, dropping me from 60 fps to 40fps. The second problem is that it only works with the bee in the center, and not the bee's on the left and right. Here is an example of what I want the minigame to do.
This is the event I have so far:
The variable MG Flower Bee Settings is set to 1, which activates a loop. In that loop, a conditional branch is activated that shows a picture of a bee above the center flower and shakes it back and forth. It then sets the variable MG Flower Bee Center to 1 to show that the center bee is active, then it sets the bee picture's Y coordinate variable as 372, and it's X coordinate variable as 408. Finally, it sets the variable MG Flower Center Bee Loop to 1 to move the bee upwards.
When MG Flower Center Bee Loop = 1 it activates a conditional branch that spawns a picture of the center bee using variables for it's X and Y coordinates. It then waits 1 frame and subtracts 7 from the Y coordinate variable every loop in order to make the center bee move upwards. I then repeated this process, but this time the bee comes out of the flower on the left instead of the center.
I then added a conditional branch for if the player failed to dodge the center bee. If the variable MG Flower Bee Center = 1, and the center bee's Y coordinate variable = 272 or lower (meaning the bee has hit the nose) , and the variable MG Flower Nose Center = 1 (meaning the nose is above the center flower) and the switch MG Flower Center Bee Miss Trigger is off (meaning the bee hasn't already passed the nose), then it erases the center bee's picture and flashes the screen red before shutting off all variables relating to the center bee. This whole sequence of events works as intended, although it does cause the game to lag which is a problem.
The second problem happens when I try to repeat this process for the left bee.
As you can see I'm using the same process and just switching the variables to match the variables for the left bee instead of the center bee, but for some reason when the nose fails to dodge the left bee nothing happens, and the bee just phases right through it without flashing red or doing anything.
The rest of my event is just a trigger that says if either bee has gone higher past the nose, and if so to erase the bees
and controls for the nose so that the player can move it left and right using the arrow keys.
I'm looking for a better way to event this minigame, or for someone to help point out the problems that are making it lag the game and not work properly. Any help would be extremely appreciated, thanks 🙂
I have a basic version of this minigame made using an event, but it has two problems. The first problem is that it starts to lag the game when it runs, dropping me from 60 fps to 40fps. The second problem is that it only works with the bee in the center, and not the bee's on the left and right. Here is an example of what I want the minigame to do.
This is the event I have so far:
The variable MG Flower Bee Settings is set to 1, which activates a loop. In that loop, a conditional branch is activated that shows a picture of a bee above the center flower and shakes it back and forth. It then sets the variable MG Flower Bee Center to 1 to show that the center bee is active, then it sets the bee picture's Y coordinate variable as 372, and it's X coordinate variable as 408. Finally, it sets the variable MG Flower Center Bee Loop to 1 to move the bee upwards.
When MG Flower Center Bee Loop = 1 it activates a conditional branch that spawns a picture of the center bee using variables for it's X and Y coordinates. It then waits 1 frame and subtracts 7 from the Y coordinate variable every loop in order to make the center bee move upwards. I then repeated this process, but this time the bee comes out of the flower on the left instead of the center.
I then added a conditional branch for if the player failed to dodge the center bee. If the variable MG Flower Bee Center = 1, and the center bee's Y coordinate variable = 272 or lower (meaning the bee has hit the nose) , and the variable MG Flower Nose Center = 1 (meaning the nose is above the center flower) and the switch MG Flower Center Bee Miss Trigger is off (meaning the bee hasn't already passed the nose), then it erases the center bee's picture and flashes the screen red before shutting off all variables relating to the center bee. This whole sequence of events works as intended, although it does cause the game to lag which is a problem.
The second problem happens when I try to repeat this process for the left bee.
As you can see I'm using the same process and just switching the variables to match the variables for the left bee instead of the center bee, but for some reason when the nose fails to dodge the left bee nothing happens, and the bee just phases right through it without flashing red or doing anything.
The rest of my event is just a trigger that says if either bee has gone higher past the nose, and if so to erase the bees
and controls for the nose so that the player can move it left and right using the arrow keys.
I'm looking for a better way to event this minigame, or for someone to help point out the problems that are making it lag the game and not work properly. Any help would be extremely appreciated, thanks 🙂