Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: mainmenu on press of P  (Read 4395 times)

0 Members and 1 Guest are viewing this topic.

manarius

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 27
  • node it. node it all together my brethren :)
    • View Profile
    • Thats one of our Games :-)
mainmenu on press of P
« on: May 08, 2008, 06:09:11 PM »

how can i deactivate this?=
if i press P while writing into an editor the main menu opens...
this is really bad for my intentions.
i searched through the scripts but couldnt find which part of them triggers this behavior.

thx a lot in advance once again  ::)

greetings
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: mainmenu on press of P
« Reply #1 on: May 08, 2008, 07:05:16 PM »

what's in your on "Keypress" event of your game.script file?
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Kaz

  • Arberth Studios
  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 228
  • The story is the game
    • View Profile
    • Info on 'Rhiannon' & 'Coven'
Re: mainmenu on press of P
« Reply #2 on: August 03, 2008, 08:23:29 PM »

I'm getting the same as this - press 'p' in an editor and it brings up the main menu

Keypress event of game.script is looking for ESC or FI so that's not it:
Code: [Select]
on "Keypress"
{
global AllowEscape;
if(AllowEscape == null)
  {
  AllowEscape = true;
  }
  // on Esc or F1 key
if(AllowEscape == true && (Keyboard.KeyCode==VK_ESCAPE || Keyboard.KeyCode==VK_F1))
  {
  // load and display the main menu window
  WinCaption.Visible = false;
  var WinMainMenu = Game.LoadWindow("interface\system\mainmenu.window");
  WinMainMenu.Center();
  WinMainMenu.GoSystemExclusive();
  Game.UnloadObject(WinMainMenu);
  }
}
and keys.inc doesn't even refer to 'p'
Code: [Select]
var VK_F1         = 112;
var VK_ESCAPE     = 27;

I know some games use 'p' for pause - could it be built into the engine? How do I bypass it? If I have to manually trap 'p' and redirect it, where do I do that?

Cheers

Logged
\"Fans of popular horror adventures like Scratches and Barrow Hill should start bracing themselves for another haunting experience, as independent developer Arberth Studios has announced production on its debut title Rhiannon - Curse of the Four Branches.\" - AdventureGamers.com

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: mainmenu on press of P
« Reply #3 on: August 03, 2008, 08:58:22 PM »

I've already answered this elsewhere, but you should add this to your F1 condition && !Keyboard.Printable
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Kaz

  • Arberth Studios
  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 228
  • The story is the game
    • View Profile
    • Info on 'Rhiannon' & 'Coven'
Re: mainmenu on press of P
« Reply #4 on: August 04, 2008, 12:21:56 AM »

Hi Metamorphium

Can you point me at your answer? When I put my circumstances into the search, that was the only one that came up.

I think it's something to do with 'p' and 'F1' both reponding to scancode 112, is that it?

Cheers
Logged
\"Fans of popular horror adventures like Scratches and Barrow Hill should start bracing themselves for another haunting experience, as independent developer Arberth Studios has announced production on its debut title Rhiannon - Curse of the Four Branches.\" - AdventureGamers.com

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: mainmenu on press of P
« Reply #5 on: August 04, 2008, 12:33:45 AM »

That's the post metamorphium posted about. Basically you are right, it seems that at some computers p & F1 both respond to the same keycode. But using the Keyboard.Printable attribute will solve it since one (p) will return true and the other (F1) will return false.
Logged
fl*p

Kaz

  • Arberth Studios
  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 228
  • The story is the game
    • View Profile
    • Info on 'Rhiannon' & 'Coven'
Re: mainmenu on press of P
« Reply #6 on: August 04, 2008, 10:05:42 AM »

Thanks all! ::thumbup
Logged
\"Fans of popular horror adventures like Scratches and Barrow Hill should start bracing themselves for another haunting experience, as independent developer Arberth Studios has announced production on its debut title Rhiannon - Curse of the Four Branches.\" - AdventureGamers.com
 

Page created in 0.078 seconds with 23 queries.