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: Use Buttons like keyboard !  (Read 3169 times)

0 Members and 1 Guest are viewing this topic.

Endrit

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 62
    • View Profile
Use Buttons like keyboard !
« on: April 09, 2012, 06:30:54 PM »

Hi guys ,
How are You ?
I have a little problem !!!

Here's my problem : I have a some buttons and a editor in a window , I'd like to use this buttons like the numbers in the keyboard .
But I have no idea how to do it .

on "one" {

code ????

}

what should insert ??

thanks guys !
« Last Edit: April 09, 2012, 06:43:07 PM by Endrit »
Logged

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: Use Buttons like keyboard !
« Reply #1 on: April 09, 2012, 07:33:35 PM »

You can do something like "Game.ApplyEvent("Keypress");" . Then you can edit the on "Keypress" section in your game.script file.

Greets,

Spellbreaker
Logged

Endrit

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 62
    • View Profile
Re: Use Buttons like keyboard !
« Reply #2 on: April 10, 2012, 12:20:00 PM »

Thanks spellbreaker
but i really don't understand nothing about scripting can you explain step by step  ::slug ::slug ::slug ::slug
Logged

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: Use Buttons like keyboard !
« Reply #3 on: April 10, 2012, 06:23:21 PM »

You should read the WME Wiki. Otherwise you will get lost in keycodes, eventhandling and stuff. I already wrote what you have to do:

In the Button you make something like

on "LeftClick" {
Game.ApplyEvent("Keypress");".
}

Then you have to edit the Keypress section in your game.script file. You then have to check in which scene you currently are, and then check the keys. That way you can check both keypresses and mousclicks on your buttons.

Greets,

Spellbreaker
Logged
 

Page created in 0.018 seconds with 23 queries.