Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

Click here to join us on IRC (#charas on irc.freenode.net)!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Key input processing... I despise you....
« previous next »
  • Print
Pages: [1]

Author Topic: Key input processing... I despise you....  (Read 1952 times)

Offline zuhane1

  • Member
  • Associate
  • *
  • Posts: 210
  • Male, Tall, 16, UK, Brown hair, Tom.
Key input processing... I despise you....
« on: February 12, 2008, 12:08:38 PM »
I've got something going on in my game but it's rather tricky to explain. You can basically use certain abilities such as a grapple hook or jump on certain spots, but there's three things going wrong.

1. No matter which way my character faces, it still applies. So if I face left to grapple onto a platform on my right, I'll face left but grapple right!

2. If I press the wrong key first, I have to leave the platform and go back onto it. I know labels are supposed to sort this out but I don't really understand how it all works. For example, if I stood on a grapple platform and used Colour Spray then tried the grapple it wouldn't work because I'd have already pressed a key.

3. Once I enter a platform my character stops walking and stays completely still. I have to press the correct key otherwise he stays still. I want some secrets in the game, secret areas to grapple onto. I can't have that if the character actually stops.

Could some awesome person PLEASE make up some kind of script to fix this? I'll be working on it but I have very little knowledge of Key Input Processing. Thanks!
Logged
Nether-
A game featuring more extras and minigames than anything. Endorse in hours of fun without even doing the storyline. A game with so many features it's just not right.

Offline SaiKar

  • KOFFING!
  • Staff
  • Royal
  • *
  • Posts: 4,082
(No subject)
« Reply #1 on: February 12, 2008, 04:15:06 PM »
Key input processing is a powerful little thing, but it can be hard to control. It wouldn't be a bad topic to write a whole tutorial about.

The main thing to remebmer is that when you start doing key input processing, the normal function of all keys totally stops if you're using it for key inputting. In other words, pressing up doesn't move you up, pressing down doesn't move you down. For things like custom menus, this is good since you want the character to stand still while you fiddle with the menu. However, since you want the character to be able to move while the processing is runnng, you don't want to process those keys.

I get the feeling you're using individual events for key inputting. That's why you keep getting into problems with it freezing on you until you press a key and such. A much better way to do it would be to have a paralell process event in the background running and tracking where the character is by their X, Y position. Once the character gets to the X,Y where you want to let them grapple, have an event activate if they push the grapple key.

I'll be honest, this sort of thing is some of the most complicated stuff you can do in RPGMaker. If you really don't understand I'll write a very small explination of how to code it, but I can't make it work for your game specifically so it would be better if you try it yourself.
Logged

Offline zuhane1

  • Member
  • Associate
  • *
  • Posts: 210
  • Male, Tall, 16, UK, Brown hair, Tom.
(No subject)
« Reply #2 on: February 12, 2008, 06:12:25 PM »
Thanks for this, using parallel processes has completely changed everything and made it much, MUCH easier. Thanks again!
Logged
Nether-
A game featuring more extras and minigames than anything. Endorse in hours of fun without even doing the storyline. A game with so many features it's just not right.

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Key input processing... I despise you....
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum