Mini-Game Idea?

LawrenceindaSky

Veteran
Veteran
Joined
Apr 21, 2016
Messages
64
Reaction score
4
First Language
English
Primarily Uses
N/A
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.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
It is indeed possible but as you said, can be quite complicated to do.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,088
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
Just tested an event like this (followers hidden so they don't get in the way), featuring a script call to check for passability~ :kaopride:
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
Script call, edit the first two lines to match your switch and variable IDs (I've used switch 8 and variable 25):
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!
} } } }
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. :kaoback:

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. :kaophew:

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? :kaoswt2:

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~ :kaojoy:
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top