REQUESTING RPG MAKER 2003 HELP - KEY INPUT AND CONDITIONAL BRANCH ISSUES.

Posts

Pages: 1
Thiamor
I assure you I'm no where NEAR as STUPID as one might think.
63
Now my problem is that I can get Key Input Processing and Conditional Branches to work, to an extent.

Let me explain what I'm trying to accomplish, first. I am working on a game that is nothing but a mini-game of sorts. Imagine the old Mario games, where you travel on the over-world map, going to level after level. Basically that is what this game is. But there is a twist. You cannot control yourself directly whilst on the Over-World map. You push Shift and it randomly picks a number between 0 and 40.

If it picks anything from 1 through 8, it moves you different directions. Anything from 9 through 21, it places you into battles.

Anything from 22 through 32, it will either heal you, allow you to save the game, or throws you into a boss type of battle.

Anything from 33 to 40, it will give you items such as weapons and/or armor that you cannot get from stores or regular battles.

They will have levels you can access whilst traveling on the Over-world map. These you will have to beat, to progress the map further. They have stores, or long, unbearable maps, or little fights you have to get passed. The game's focal point is that it's meant to be annoying, whilst being thrown into a mini game status. The name of the game is "The Most Annoying Game in the World".

Now my main problem is adding anything to disable the use of the directional keys whilst still being able to access the menu. So they will HAVE to press shift to move, as Shift is the button that generates the random number. Which causes them to move/get into fights/what have you. The problem is that it either places a lag, then opens the menu up when clicked, or doesn't allow movement or key pressings of any kind.

Also I did think of adding a key to access the menu, but I'd still rather directional keys being disabled. Anyone here have a simple solution for this conundrum?

What I tried to do was use Conditional branches using Key inputs for Up, Down, Left and Right and call upon either that number the key uses, or the Variable reference the numbers are located on, then makes it where the character is put into a "waiting" status from the "move event" function if they press up, down, left and/ or right (if I'm explaining it right.)

But nothing seems to work.
author=Thiamor
But nothing seems to work.


Well, what did you expect? This is The Most Annoying Game in the World, even for YOU!

Just kidding :P

An easy way to solve the problem of arrow keys is to use an Event as your playable character:
First make sure the real character is always stuck in a corner on impassable tiles, or surrounded by them.
Have the Event be the hero's sprite, and have it move during the Shift-activated commands.
Why don't you just make the whole map impassible terrain, and every time you press shift, you just allow the hero to walk through all objects, until he reaches the final destination(I presume the path the hero walks is scripted).
As far as I know you can not cancel out normal movement in 2K3, with the exception of scripting
Thiamor
I assure you I'm no where NEAR as STUPID as one might think.
63
Oh. You know what's funny? I've done this before, just didn't think about that. But the problem is if the map is big. Editing to always pan where the event is moving would be pretty much a hassle. Also let's not forget the problem it'd have when reaching the event where it teleports to the level. I've always had problems of making it where an event touching and event triggers a teleport.

Have any other suggestion(s) that would still allow me to keep my actual character moving?
You could always try my suggestion :(
I'm not sure I want to help with this game...heh

Do you want to use DynRPG? That would make it incredibly easy. Install a patch and use a single switch. ON - Player can't move, OFF - Player can move. Normally you can't press any other buttons either, but with DynRPG plugin you can. (This solution is so easy that you'll laugh)

If you don't want DynRPG, I have a method I came up with that uses coordinates and 4 unpassable blocks to surround the hero so he can't move(it's a skill in my game xD). The arrow keys would still turn the hero around, so you could change the sprite to something static or use lock facing.

Or, here's something I just thought of, make the entire map out of 2 types of unpassable blocks; ones that will stay unpassable and ones that will becomes passable. That way the player cannot move the hero at any time if a switch is OFF, lets say. When you turn the switch ON, use the swap tile command to change the ones that will become passable to passable blocks. . You can still access menu and when you press SHIFT it does the random number.

If you want to make the hero move automatically, you can use Move Hero commands with Phasing Mode ON.

Edit:
author=Avee
Another solution would be to have 4 impassable events surround the real hero at all times to block arrow key movement. These events would have to move at the same time as the hero I believe.

My method grabs the hero coordinates and goes through variable operations to place 1 of those events in front of the hero, then more operations to place it to the right, and all around :P So you can equip the third level Magic Wand and press shift to place or remove the "sheild" of blocks.
Right.
If it isn't too much of a hassle, you could pan the screen by the same number of tiles walked in the same event as the movement roll.
And you can have Parallel Processed conditions check if the Event's X and Y positions are the same as the Teleport Event's (or any other type of Event Touch-activated event).

Another solution would be to have 4 impassable events surround the real hero at all times to block arrow key movement. These events would have to move at the same time as the hero I believe.

EDIT: Gee, we're all posting at the same time :P
Thiamor
I assure you I'm no where NEAR as STUPID as one might think.
63
Well I guess I could do the 4 unpassable events. But is it possible that if the player cannot move because of an "impossible move", it makes the 4 events not move?

I'll also try the map suggestion. See if that works out better.
Uh, don't you want the simple easy solution? Which isn't any of the ones you talked about.
Thiamor
I assure you I'm no where NEAR as STUPID as one might think.
63
Well I'd rather not have to download another program just to get it to work. It might be easier but I'm a stickler when it comes to downloading stuff if there is another option.
That's too bad, you don't know what your missing. It's not just some program to fix a bug or roadblock. It gives you access to use every key on the keyboard, even the mouse.

Think about that.

As far as using the other method, it's in my Zelda game. Common event 139, you can copy and paste it maybe.



You would need a common event that just grabs hero's coordinates. (look at those sloppy conditional branches haha some of my old code)

There is a branch for each direction because the same block needed to be in front, but you only need what's in the Left Facing
dragonheartman
Developer, Starless Umbra / Heroes of Umbra
2966
If you want the character to stop in place, you can also do a move event: hero, wait (repeat) command and that will stop the hero from moving until another move event command references the hero to cancel it. You can save a lot of frustration by sticking to a transparent hero and then moving an event accordingly instead.
author=dragonheartman
If you want the character to stop in place, you can also do a move event: hero, wait (repeat) command and that will stop the hero from moving until another move event command references the hero to cancel it. You can save a lot of frustration by sticking to a transparent hero and then moving an event accordingly instead.


That's the easy method I was referring to, but I had been using it a different way. I had mine as Autostart with the Move event not repeating, but that prevents you from pressing the other buttons. Your way works much better for this and it doesn't need DynRPG xD I'm gotta use this now.
Have you considered using an "auto-start" event to limit the movement (and simply adding in possibility of accessing menu and whatever else per key input)?
author=Kazesui
Have you considered using an "auto-start" event to limit the movement (and simply adding in possibility of accessing menu and whatever else per key input)?


I have. Just now :P

The way I used it was to prevent pressing any buttons, but now I know it can do much more.
Pages: 1