September 21, 2023, 06:58:32 am

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Due to a rise in bot activity, new posters need to be approved before posting.

Join the community Discord server!

Pages: [1]

Author Topic: Coding Help  (Read 885 times)

BatCow

  • Junior Member
  • **
  • Karma: 5
  • Offline Offline
  • Posts: 83
  • Absolue Garbage
Coding Help
« on: June 24, 2017, 07:34:41 pm »

I'm trying to bind events to buttons, is there a standard list for the keys (specificly, the numbpad)
My code:
object_event_add(PlayerControl, ev_keypress, ord('key'), '
Logged
A demake of a clone of a remake of a sequel made using assets from a demake of a sequel to a sequel

Spazz

  • Seasoned Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 1933
  • Almost too much seasoning.
Re: Coding Help
« Reply #1 on: June 24, 2017, 08:29:26 pm »

Here's a piece I have, original was Derpduck until I modified it,

Code: [Select]
object_event_add(PlayerControl,ev_step,0,'
if keyboard_check_pressed(vk_f2)==1{

//Do Stuff

}
')

Edit: That is for Function Keys, F1~12. I forget which keys kill the exe, screenshot and mute GG2 since I use only up to F8
« Last Edit: June 24, 2017, 08:31:10 pm by Spazz »
Logged

<3 Bustatunez

PrOF

  • Heroic Member
  • ****
  • Karma: 43
  • Offline Offline
  • Posts: 600
  • Sometimes a dev. Only sometimes
Re: Coding Help
« Reply #2 on: June 25, 2017, 02:58:32 am »

Logged

BatCow

  • Junior Member
  • **
  • Karma: 5
  • Offline Offline
  • Posts: 83
  • Absolue Garbage
Re: Coding Help
« Reply #3 on: June 25, 2017, 06:58:09 am »

Thanks, I'm really bad at this
Logged
A demake of a clone of a remake of a sequel made using assets from a demake of a sequel to a sequel
Pages: [1]
 

Page created in 0.052 seconds with 36 queries.