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: press any key (SOLVED)  (Read 2697 times)

0 Members and 1 Guest are viewing this topic.

Johny.D

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
    • View Profile
press any key (SOLVED)
« on: June 05, 2014, 10:50:30 PM »

Hello again,
I would like to ask If is some method there for check every key on keyboard.
My goal is simple scene before menu like for example in AAA games. With name of the game and simple flashing text
"press any key".

any ideas ?

« Last Edit: June 07, 2014, 09:52:56 AM by Johny.D »
Logged

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: press any key
« Reply #1 on: June 06, 2014, 05:58:57 PM »

You can achieve this by catching the Keypress event. In game.script you can have something like this:

Code: WME Script
  1. on "Keypress"
  2. {
  3.   if(Scene.Name == "NameOfTheScene")
  4.   {
  5.     Game.ChangeScene(<scene>, FadeOut, FadeIn);
  6.   }
  7.   ...
  8. }
  9.  

You can try several values for FadeOut and FadeIn to make it look pretty.
Logged

Johny.D

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
    • View Profile
Re: press any key
« Reply #2 on: June 07, 2014, 09:52:10 AM »

Thank you !  :)
Logged
 

Page created in 0.042 seconds with 22 queries.