how can i detect "xxx" buttonpressed like in usebuttonpressed() or attackbuttonpressed ?
example ; when players pressed G
PHP Code:
while(self FragButtonPressed()
{ //Do Stuffs
}
how can i detect "xxx" buttonpressed like in usebuttonpressed() or attackbuttonpressed ?
example ; when players pressed G
PHP Code:
while(self FragButtonPressed()
{ //Do Stuffs
}
feanor (26th July 2016)
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.
"Does not work" is an error report for a bug between keyboard and chair.
All hail Artie Effem
Ni3ls (13th July 2016)
Paho (23rd July 2016)