So I may sound a little crazy or nuts for thinking of this as a Idea but, is it possible to make a GamePlay style of the game Catherine where you can pull and push blocks to climb? I’d say it is possible but very complex. I just thought of the idea and i’d figure trying to see if i can achieve this.
Mini-Game Idea?
RPG Maker MV SupportIt is indeed possible but as you said, can be quite complicated to do.
How would i go about this? i know a lot of conditional branches would have to be made.
Just tested an event like this (followers hidden so they don't get in the way), featuring a script call to check for passability~ 😤
Script call, edit the first two lines to match your switch and variable IDs (I've used switch 8 and variable 25):
You'll also need to edit the move routes so they reference the correct variable for their move direction. 🙂
Basically, it uses a loop plus some Conditional Branch commands to check which buttons are being pressed down. When activating the event, hold the action button and press a directional button to try to move that way. As always with loops, you have to be careful with wait commands, otherwise everything will just freeze up. 👋
The convoluted script thing is because we want to check collisions (unless you want to risk player and event getting out of sync) but not between the event and player (or their followers). If you're using followers then you may want to add Through ON/OFF to the event's move route so they don't block the way. 😮💨
As for the climbing, that's another matter. Maybe move a Below Player event in sync with the pushable object, I think that'll override tile passability? 😅
Edit: after testing a bit more I've updated my event example. The "grab" button is now the normal action button (Enter or Z) and I added a check for player colliding with other events. Looks ugly but seems to work~ 😂
Code:
◆Comment:Hold action button (Z / Enter) to push/pull objects
◆If:Button [OK] is pressed down
◆Comment:Await further input
◆Loop
◆If:Button [OK] is pressed down
◆Comment:--- Get move direction ---
◆If:Button [Down] is pressed down
◆Control Variables:#0025 dir = 2
◆
:Else
◆If:Button [Left] is pressed down
◆Control Variables:#0025 dir = 4
◆
:Else
◆If:Button [Right] is pressed down
◆Control Variables:#0025 dir = 6
◆
:Else
◆If:Button [Up] is pressed down
◆Control Variables:#0025 dir = 8
◆
:Else
◆Control Variables:#0025 dir = 0
◆
:End
◆
:End
◆
:End
◆
:End
◆Comment:--- Process input direction ---
◆Comment:Check passability
◆Script:var switchId = 8; // ID of switch to store result in
: :var d = $gameVariables.value(25); // direction variable
: :var e = this.character(0); // this event
: :var p = $gamePlayer, g = $gameMap; // shorthand
: :$gameSwitches.setValue(switchId, false); // default
: :if (d > 0 && e.isMapPassable(e.x, e.y, d)) {
: : if (p.isMapPassable(p.x, p.y, d)) {
: : if (g.eventsXyNt(g.roundXWithDirection(e.x, d), g.roundYWithDirection(e.y, d)).length === 0) {
: : var cEvs = g.eventsXyNt(g.roundXWithDirection(p.x, d), g.roundYWithDirection(p.y, d));
: : if (cEvs.length === 0 || cEvs.every(function(ev) { return ev.eventId() === this.eventId(); }, this)) {
: : $gameSwitches.setValue(switchId, true); // pass!
: :} } } }
◆Comment:Check result
◆If:008: MoveIsOK is ON
◆Set Movement Route:Player
: :◇Direction Fix ON
: :◇Script:this.moveStraight($gameVariables.value(25));
: :◇Direction Fix OFF
◆Set Movement Route:This Event (Wait)
: :◇Script:this.moveStraight($gameVariables.value(25));
◆
:Else
◆Comment:Check again in a few frames (60 fps)
◆Wait:6 frames
◆
:End
◆
:Else
◆Comment:Push/pull button released -> end loop
◆Break Loop
◆
:End
◆
:Repeat Above
◆
:End
Code:
var switchId = 8; // ID of switch to store result in
var d = $gameVariables.value(25); // direction variable
var e = this.character(0); // this event
var p = $gamePlayer, g = $gameMap; // shorthand
$gameSwitches.setValue(switchId, false); // default
if (d > 0 && e.isMapPassable(e.x, e.y, d)) {
if (p.isMapPassable(p.x, p.y, d)) {
if (g.eventsXyNt(g.roundXWithDirection(e.x, d), g.roundYWithDirection(e.y, d)).length === 0) {
var cEvs = g.eventsXyNt(g.roundXWithDirection(p.x, d), g.roundYWithDirection(p.y, d));
if (cEvs.length === 0 || cEvs.every(function(ev) { return ev.eventId() === this.eventId(); }, this)) {
$gameSwitches.setValue(switchId, true); // pass!
} } } }
The convoluted script thing is because we want to check collisions (unless you want to risk player and event getting out of sync) but not between the event and player (or their followers). If you're using followers then you may want to add Through ON/OFF to the event's move route so they don't block the way. 😮💨
As for the climbing, that's another matter. Maybe move a Below Player event in sync with the pushable object, I think that'll override tile passability? 😅
Edit: after testing a bit more I've updated my event example. The "grab" button is now the normal action button (Enter or Z) and I added a check for player colliding with other events. Looks ugly but seems to work~ 😂
Original thread: https://forums.rpgmakerweb.com/threads/mini-game-idea.114121/