how can i detect "xxx" buttonpressed like in usebuttonpressed() or attackbuttonpressed ?
example ; when players pressed G
PHP Code:
while(self FragButtonPressed()
{ //Do Stuffs
}
Printable View
how can i detect "xxx" buttonpressed like in usebuttonpressed() or attackbuttonpressed ?
example ; when players pressed G
PHP Code:
while(self FragButtonPressed()
{ //Do Stuffs
}
if you want G (grenade) you can use for example:Code:CodeCallBack_FireGrenade
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.