PDA

View Full Version : xxx buttonpressed



feanor
12th July 2016, 08:26
how can i detect "xxx" buttonpressed like in usebuttonpressed() or attackbuttonpressed ?

example ; when players pressed G


while(self FragButtonPressed()
{ //Do Stuffs
}

Ni3ls
12th July 2016, 09:13
https://killtube.org/showthread.php?2293-Binding-custom-keys-to-perform-action&p=12535&viewfull=1#post12535

maxdamage99
12th July 2016, 15:50
if you want G (grenade) you can use for example:
CodeCallBack_FireGrenade

IzNoGoD
13th July 2016, 07:31
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.

maxdamage99
13th July 2016, 12:27
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