I'm made a mini game where the player has to push (with the Enter Key) sheep into a barn. It all worked normally. But then I saw the sheep could go in and out of the barn door by itself. So I tried using region block. But now I can't push the sheep in. So I tried a way to complex for me conditional branch. If sheep is in front of barn and player is behind sheep and the player presses the A key (There is no Enter key) then it completes the mini game. So of course it didn't work. And I haven't even solved the original problem. I've added all the event pics below to show you what I was trying to do.
VXAce Looking for help with conditional branches with a mini game.
RPG Maker VXAce SupportI didn't read all that, but can't you make the door tile non-passable and then when you press the enter to give move route to push the sheep, you put through on for the sheep at the start (if you want you can make it conditional to only put the through on if you check that the sheep is in front of the door and player is facing up)?
i think your making ship image to none and then making sheep trough on so that you can show your player push the ship,
you made region so that sheep which is pushed in should not come out side, but now becuse of region you cant push outside sheep to inside barn
i dk if you really need region
once you push the sheep you can make sheep go some place wher you want to put and then make move route to none so they dont come out of the barn ?
if you can paste region image also would be esy to understand what your trying
you made region so that sheep which is pushed in should not come out side, but now becuse of region you cant push outside sheep to inside barn
i dk if you really need region
once you push the sheep you can make sheep go some place wher you want to put and then make move route to none so they dont come out of the barn ?
if you can paste region image also would be esy to understand what your trying
I'm still confused. Can u add some pics of what you mean?
You say "So of course it didn't work." What exactly didn't work? The sheep didn't go in and disappear? In that case maybe when you're turning the sheep's through on, before that also turn the barn door's through on (and then turn it off again so that other sheep don't go in). Or was something else not working?
If I set the barn door to same as same characters I can't push the sheep through it. If I always have through on under options on the door itself the sheep can enter it by themselves. If I have the door below characters same problem. I can't have through on under move routes when pushing the sheep or the player can push them through walls. If I have a space in front of the door with X and Y coordinates with conditional branches if sheep x is at front of barn door x and sheep y is at front of barn door y and if player x and y is at a even at the space behind the sheep at space behind the space in front of door then sheep get through on. But if it moves to in any other direction it loses through on. But it can still move backwards through the player. So at that point I'm lost.
Looks like the order of Movement and Through are backwards try this (names are different but you get the idea.)
Sheep2.png edit
This change is pretty much what rpgLord69 suggested... what a name.
Sheep2.png edit
This change is pretty much what rpgLord69 suggested... what a name.
Nope. Didn't work. Unless I did something wrong. Which is entirely possible. But I still don't understand how the player can push the sheep into the barn when the sheep has through on. Having through the barn door would make more sense.
I'm assume the X was the Sheep. Since you had Sheep2.png edit. There are 4 sheep total and I'm just trying to get this to work on sheep 1 first. The second and third lines on sheep2 pic are supposed to be
. They have been updated.
I'm assume the X was the Sheep. Since you had Sheep2.png edit. There are 4 sheep total and I'm just trying to get this to work on sheep 1 first. The second and third lines on sheep2 pic are supposed to be
Sorry, didn't really explain it properly. The three conditional branches I added at the start allow the sheep to pass through the barn door by turning the sheep's Through On, while player facing up is self explanatory, the other two are ment to be the X and Y position of the sheep in relation to the tile below the barn door not the barn door itself.
I tried your suggestion and the only difference was I was able to push a sheep into the barn. It didn't vanish or trigger anything. Have you tried making a mock up of it and trying it out? I didn't understand the value thing but put it in nyway. I just made new switches and named them values. Unless there is some other game mechanic I'm missing. Unless the value themselves are different. Can you prove a screenshot of the value setup?
I was being lazy before by keeping my own variable names (value1,value2,etc.), you weren't meant to change yours. But I see that confused you.
Spotted an oversight as well.
Heres the image using your variable names,
Note that the variables (BarnDoorX, BarnDoorY, BelowBarnDoorX, BelowBarnDoorY) never change so they only need to be set once. I'd probably set them in the intro event, so before the minigame starts.
And obviously, all the variables relating to sheep 2 should be changed to sheep 1 and 3 and 4 etc. respectively for when you're correcting their own events.
Spotted an oversight as well.
Code:
Control Varables: [0108:Sheep 4 X] = Variable [0108:Sheep 4 X]
Control Varables: [0109:Sheep 4 Y] = Variable [0109:Sheep 4 Y]
#Should be replaced with,
Control Varables: [0104:Sheep 2 X] = [sheep two]'s Map X
Control Varables: [0105:Sheep 2 Y] = [sheep two]'s Map Y
Heres the image using your variable names,
Note that the variables (BarnDoorX, BarnDoorY, BelowBarnDoorX, BelowBarnDoorY) never change so they only need to be set once. I'd probably set them in the intro event, so before the minigame starts.
And obviously, all the variables relating to sheep 2 should be changed to sheep 1 and 3 and 4 etc. respectively for when you're correcting their own events.
OK I got it now. Thanks.
Original thread: https://forums.rpgmakerweb.com/threads/looking-for-help-with-conditional-branches-with-a-mini-game.178695/