Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Problem with ESC and F1 - they don't work...  (Read 5657 times)

0 Members and 1 Guest are viewing this topic.

Kenshiro

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • View Profile
    • My homesite
Problem with ESC and F1 - they don't work...
« on: July 23, 2008, 06:26:22 AM »

Hi, I'm new to this forum so welcome everyone. WME is great and I'm currently working on my first project. Everything is going well (but ssslowly, lot of work :)) but I have a small problem: when I run my game, hitting ESC or F1 doesn't bring the main menu (Quit, Save, Load, Resume). And I can quit the game only by clicking red cross in the corner. Menu worked at the beginning, when I installed WME. It's not only the case of my project - the same thing happens with demo games included with WME.

I didn't change any game scripts or "global settings", ecpecially connected with menus. I installed WME on my older computer and everything works fine (also with my project) so I guess it must be something with the software settings. But which? Any ideas? I compared everything between the two computers and I can't find any difference.

I would be grateful for any suggestions because the project is growing and having the possibility of saving game would be really handy.
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: Problem with ESC and F1 - they don't work...
« Reply #1 on: July 23, 2008, 07:29:52 AM »

This would be great to trace as I got from three people the same bug report and never was able to fix it in my Ghost in the Sheet game. It's connected to target computer somehow, but never found out how.

Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Problem with ESC and F1 - they don't work...
« Reply #2 on: July 23, 2008, 07:41:28 AM »

Do you have one of those new shinny multimedia keyboards where most keys have double functions? (like F keys for example)
Logged
fl*p

Kenshiro

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • View Profile
    • My homesite
Re: Problem with ESC and F1 - they don't work...
« Reply #3 on: July 23, 2008, 07:47:33 AM »

Thanks for the fast reply. I guess I'll try to attach the menu script to the mouse right button click, maybe it will work.

Odnorf: no, I don't like those multimedia keyboards, I have the simplest possible  :)
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: Problem with ESC and F1 - they don't work...
« Reply #4 on: July 23, 2008, 07:50:57 AM »

Another question, which might solve this issue for all of us:

in game.script try modifying this condition:

(Keyboard.KeyCode==VK_F1 && !Keyboard.Printable)

Some keyboards might theoretically send letter p instead of F1

Let us know if it fixed it!
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Kenshiro

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • View Profile
    • My homesite
Re: Problem with ESC and F1 - they don't work...
« Reply #5 on: July 23, 2008, 08:00:30 AM »

After restarted game and engine, menu works on pushing F1 and exits (returns to game) on ESC.  :)
and also now:
- in wme_demo, both ESC and F1 work (without changing game.script)
- in scene_tut only ESC work (without changing game.script)
« Last Edit: July 23, 2008, 08:11:04 AM by Kenshiro »
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: Problem with ESC and F1 - they don't work...
« Reply #6 on: July 23, 2008, 08:02:54 AM »

If you place Game.Msg("Pressed"); in your on "Keypress" event, does it show?

Next step would be to print Game.Msg(Keyboard.KeyCode); instead.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Kenshiro

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • View Profile
    • My homesite
Re: Problem with ESC and F1 - they don't work...
« Reply #7 on: July 23, 2008, 08:16:08 AM »

Message shows on pressing F1.
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: Problem with ESC and F1 - they don't work...
« Reply #8 on: July 23, 2008, 09:44:49 AM »

Ok, so try modify the condition to read this:

((Keyboard.KeyCode==VK_F1 || Keyboard.KeyCode=="F1") && !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

Kenshiro

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • View Profile
    • My homesite
Re: Problem with ESC and F1 - they don't work...
« Reply #9 on: July 23, 2008, 09:58:17 AM »

When I modified the script of my project, ESC key started working in all demo games (without changing THEIR scripts) but in my project F1 brings menu and ESC closes it. Kinda funny but at least I can continue my work  :)
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Problem with ESC and F1 - they don't work...
« Reply #10 on: July 27, 2008, 12:06:18 PM »

Ugh. I'd really like to know what was the cause and why it started to work all of a sudden...
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.041 seconds with 24 queries.