Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: Keyboard key "P" always pause the game  (Read 3820 times)

0 Members and 1 Guest are viewing this topic.

Ennio

  • Lurker
  • *
  • Karma: 2
  • Offline Offline
  • Posts: 40
    • View Profile
Keyboard key "P" always pause the game
« on: February 08, 2012, 02:05:51 PM »

It's a bit strange, whenever i hit "p" button the pause menù is loaded.

But the only control for that menù is:
Code: WME Script
  1. if(Keyboard.KeyCode==VK_ESCAPE || Keyboard.KeyCode==VK_F1)

i cannot found the solution in keys.inc...the P code should be 80 but there isn't.
What i'm missing?
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Keyboard key "P" always pause the game
« Reply #1 on: February 08, 2012, 06:17:30 PM »

can you post the whole keyboard handler? Also are you developing on laptop?
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Keyboard key "P" always pause the game
« Reply #2 on: February 09, 2012, 08:11:17 PM »

Also try this!

Code: WME Script
  1.  
  2. if ((Keyboard.KeyCode==VK_ESCAPE || Keyboard.KeyCode==VK_F1) && !Keyboard.Printable)
  3.  
  4.  
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

hex

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
    • View Profile
Re: Keyboard key "P" always pause the game
« Reply #3 on: May 24, 2012, 05:56:37 AM »

Same thing here and I'm using a laptop. Pressing the P key brings up the main menu (based on the default code in game.script).

Deleting the VK_F1 line in the if statement took care of the problem, but it also means I can't use the F1 key without the P key performing the same function. So for some reason, VK_F1 detects P keypresses.

Not an issue for me because I don't plan on using the F1 key at the moment, but it's just a FYI for anyone having this problem.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Keyboard key "P" always pause the game
« Reply #4 on: May 24, 2012, 06:38:27 AM »

Not if you use the condition metamorphium posted above.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.051 seconds with 22 queries.