Dev - RM2k3 RM2K3 Key Input FAIL! Help me! (Read 450 times)

  • Avatar of Paul3K
  • We want...More money!
  • Group: Member
  • Joined: Mar 2, 2007
  • Posts: 51
Right all I'm tryin to do is make my run button sys. It works, but there is a problem. Basically now n then for a split second when running the character slows down then picks back up. SO i made a sound effect happen when the key is being pressed and when it is not being pressed.
 Please can you code this in RM2k3 now please to see if it does the same thing to you.
                 
Common Event:       Parallel Process
<>Key Input Process (v0001) Set it to whatever ( i have it on shift, but I've tried others) WITH AN ELSE HANDLER and WITHOUT THE WAIT TICK BOX
<>If v0001 = 7
     <>Play sound effect choice
<>Else
     <>If v0001 = 0
          <>Play sound effect cancel

Now test play and you will hear SE Cancel constantly then when you press and hold shift you will hear SE Choice.
But listen closely.....you will also hear SE Cancel when holding shift. How is this possible????? Its set to never ever play SE Cancel unless the key is 0

Now at first i thought it was my shift key so i tried other keys but still no joy. Its like for s split second when it re-reads the process it gets set to 0.
What do you guys think? Can someone help me with this coz its letting my running system down :(

Thanks in advanced peeps, keep up the good work!
Last Edit: June 11, 2010, 04:31:25 am by Paul3K
  • Avatar of King of Spooks
  • Dog: "Just tell me what the hell you want me to do!"
  • PipPipPipPipPipPipPip
  • Group: Premium Member
  • Joined: Aug 30, 2004
  • Posts: 1189
<>Key input Proc: [001:--Run--]
<>Branch if Var [001:--RUN--] is 7 (w/else case)
    <>Branch if Switch [001:Running] is OFF
      <>Move Event: Hero, Drecrease Move Speed (x5) Increase Move Speed (x4)
      <>Switch Operation: [001:Running] ON
      <>
     :END
    <>
  :Else Handler
    <>Branch if Switch [001:Running] is ON
      <>Move Event: Hero, Decrease Move Speed  (x5) Increase Move Speed (x3)
      <>Switch Operation: [001: ][/001:] OFF
     <>
    :END
    <>
   :END
   <>
 :END
<>
  • Avatar of Paul3K
  • We want...More money!
  • Group: Member
  • Joined: Mar 2, 2007
  • Posts: 51
Thanks for your help K.O.S. I tried it and I still get the same outcome. Add this please to find out what my problem is

<>Key input Proc: [001:--Run--]
<>Branch if Var [001:--RUN--] is 7 (w/else case)
  <>Play SE Choice 1
  <>Branch if Switch [001:Running] is OFF
      <>Move Event: Hero, Drecrease Move Speed (x5) Increase Move Speed (x4)
      <>Switch Operation: [001:Running] ON
      <>
     :END
    <>
  :Else Handler
  <>Play SE Choice 2
    <>Branch if Switch [001:Running] is ON
      <>Move Event: Hero, Decrease Move Speed  (x5) Increase Move Speed (x3)
      <>Switch Operation: [001: ][/001:] OFF
     <>
    :END
    <>
   :END
   <>
 :END


Now to fully understand my problem if you're interested; it is that somehow when holding shift it somehow "escapes" the code and goes to the Else handler where you can hear the SE Choice 2. This affects the sprite when he runs, makes it look laggy I guess.
Also I have a caterpillar system and they run when you run, so I can't set it to Decrease x5, increase x 3 because for some reason when you mash the shift key the hero can get a few squares away from the hero. So i have it set to just increase x1 and never call "event running" until shift is pressed again.

What do you think man?
  • Avatar of Paul3K
  • We want...More money!
  • Group: Member
  • Joined: Mar 2, 2007
  • Posts: 51
Issue solved!

After about 6 hours of experiments I've finally gotten it to do as I want. The results being;

1. Hero runs and walks fluently and accurately.

2. Caterpillar System characters run and walk fluently and accurately even when Hero running.

3. Fixed the RM2k3 fault where when holding down a key if set to Parallel Process with a "If Key is 0" handler, it would 3 times out of 10 escape from the number being held (Shift = 7) and turn to 0 therefore activating the else handler while still being pressed down.

If anyone would like to know how I did it or just have a demo of my caterpillar system with running/walking system then just ask me ^^

Thanks for reading anyway. :)
  • Avatar of King of Spooks
  • Dog: "Just tell me what the hell you want me to do!"
  • PipPipPipPipPipPipPip
  • Group: Premium Member
  • Joined: Aug 30, 2004
  • Posts: 1189
I am interested.
  • Avatar of Paul3K
  • We want...More money!
  • Group: Member
  • Joined: Mar 2, 2007
  • Posts: 51
I am interested.

Ok cool. I'm not at my pc but i have will make one for you now of how i did it.

Fuck it, here's half of my actual project. Its no where near finished but it has what I made anyway.
Its in the Common Events under ==\Hero Movement/==

Have fun n let me know what you think.

http://www.2shared.com/file/j-AE5jAE/The_Game.html
Last Edit: June 11, 2010, 09:09:03 pm by Paul3K