Results 1 to 5 of 5

Thread: xxx buttonpressed

  1. #1
    Private First Class
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    37
    Thanked 14 Times in 14 Posts

    xxx buttonpressed

    how can i detect "xxx" buttonpressed like in usebuttonpressed() or attackbuttonpressed ?

    example ; when players pressed G

    PHP Code:
    while(self FragButtonPressed() 
    //Do Stuffs


  2. #2
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts

  3. The Following User Says Thank You to Ni3ls For This Useful Post:

    feanor (26th July 2016)

  4. #3
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    if you want G (grenade) you can use for example:
    Code:
    CodeCallBack_FireGrenade

  5. The Following 2 Users Say Thank You to maxdamage99 For This Useful Post:

    Ni3ls (12th July 2016),Paho (23rd July 2016)

  6. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    codecallback_firegrenade is a custom function that might or might not be implemented in the official libcod. It gets called when the player RELEASES the grenade button and the grenade is spawned. The grenade and weapontype are sent to the callback.

    It does NOT tell you wether or not a player is holding down the grenade button.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  7. The Following User Says Thank You to IzNoGoD For This Useful Post:

    Ni3ls (13th July 2016)

  8. #5
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    Quote Originally Posted by IzNoGoD View Post
    codecallback_firegrenade is a custom function that might or might not be implemented in the official libcod. It gets called when the player RELEASES the grenade button and the grenade is spawned. The grenade and weapontype are sent to the callback.

    It does NOT tell you wether or not a player is holding down the grenade button.
    for example

  9. The Following User Says Thank You to maxdamage99 For This Useful Post:

    Paho (23rd July 2016)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •