Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Need some QuakeC Help

| Inside3d Forums Forum Index -> QuakeC Programming

View previous topic :: View next topic
Author | Message
--- | ---
hawkins83 Joined: 03 Sep 2006 Posts: 28 |

Posted: Thu Oct 19, 2006 7:20 pm Post subject: Need some QuakeC Help |

Ok i am making a counter strike mod from the tutorials. I got all 4 of them to work. How do i bind the flip, salute, and stuff frames to a button?

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Fri Oct 20, 2006 12:20 am Post subject: |

Not sure which tuts you're talking about, but here's the theory. send two stuffcmds for each button. alias +salute "impulse 50" alias -salute "impulse 51" A user can then:
bind space +salute
when pressed, 50 will trigger, when released, 51 will trigger.
It is possible that these impulses will never arrive, or will be duplicated (keyboard repeat).
The keyboard input executes the binds when pressed. On release, if the bind contains a single command/name starting with a +, then it executes the command with a - instead of that plus. Works for anything, commands, aliases... and cvars if you're crazy. Note that it also adds an extra parameter relating to which button/keycode is pressed to trigger it.
Alternativly you can depend on extensions, and send:
alias +salute +button3
alias -salute -button3
and in the code:
.float button3;
void() somefunc =
{
if (self.button3)
sprint(self, "Hey, stop saluting\n");
};
This method is more reliable, assuming the client and server both support this feature.
DarkPlaces and FTE support this feature. A few others no-doubt do but I can't name those reliably.
You don't have to do the alias thing, but it might help make people's configs make more sense.
_________________
What's a signature?

Back to top |

hawkins83 Joined: 03 Sep 2006 Posts: 28 |

Posted: Fri Oct 20, 2006 12:50 pm Post subject: |

Ok thanks, one more problem i added alot more stuff and i get this error, i can get you the code but maybe you guys could tell me what i have 2 do without looking at it. And can someone tell me how to bind a sound to a key and have it only be heard on your team not global.
error: Q551: LINK:0:player_zoomout was not defined (see prototype weapons.qc(2))
error: Q551: LINK:1:player_zoom was not defined (see prototype weapons.qc(3))
error: Q551: LINK:2:player_zoomb was not defined (see prototype weapons.qc(4))
error: Q551: LINK:3:player_mossberg was not defined (see prototype weapons.qc(1277))
error: Q551: LINK:4:player_reload_mossberg was not defined (see prototype weapons.qc(1278))
error: Q551: LINK:5:player_mp5a was not defined (see prototype weapons.qc(1279))
error: Q551: LINK:6:player_mp5f was not defined (see prototype weapons.qc(1280))
error: Q551: LINK:7:player_mp5g was not defined (see prototype weapons.qc(1281))
error: Q551: LINK:8:player_reload_mp5 was not defined (see prototype weapons.qc(1282))
error: Q551: LINK:9:player_mp5_switch was not defined (see prototype weapons.qc(1283))
error: Q551: LINK:10:player_mp5sda was not defined (see prototype weapons.qc(1284))
error: Q551: LINK:11:player_mp5sdf was not defined (see prototype weapons.qc(1285))
error: Q551: LINK:12:player_mp5sdg was not defined (see prototype weapons.qc(1286))
error: Q551: LINK:13:player_reload_mp5sd was not defined (see prototype weapons.qc(1287))
error: Q551: LINK:14:player_mp5sd_switch was not defined (see prototype weapons.qc(1288))
error: Q551: LINK:15:player_mk23a was not defined (see prototype weapons.qc(1289))
error: Q551: LINK:16:player_mk23b was not defined (see prototype weapons.qc(1290))
error: Q551: LINK:17:player_reload_mk23 was not defined (see prototype weapons.qc(1291))
error: Q551: LINK:18:player_reload_m16 was not defined (see prototype weapons.qc(1292))
error: Q551: LINK:19:player_m16a was not defined (see prototype weapons.qc(1293))
error: Q551: LINK:20:player_m16b was not defined (see prototype weapons.qc(1294))
error: Q551: LINK:21:player_m16_grenade was not defined (see prototype weapons.qc(1295))
error: Q551: LINK:22:player_raw was not defined (see prototype weapons.qc(1296))
error: Q551: LINK:23:player_kbar was not defined (see prototype weapons.qc(1297))
error: Q551: LINK:24:player_hgrenade was not defined (see prototype weapons.qc(1298))
error: Q551: LINK:25:player_assaultshotgun was not defined (see prototype weapons.qc(1299))
error: Q551: LINK:26:player_reload_psg1 was not defined (see prototype weapons.qc(1300))
error: Q551: LINK:27:player_reload_barrett was not defined (see prototype weapons.qc(1301))
error: Q551: LINK:28:player_psg1 was not defined (see prototype weapons.qc(1302))
error: Q551: LINK:29:player_barrett was not defined (see prototype weapons.qc(1303))
error: Q551: LINK:30:player_m60 was not defined (see prototype weapons.qc(1304))
error: Q551: LINK:31:player_reload_m60 was not defined (see prototype weapons.qc(1305))
error: Q551: LINK:32:player_m60_winchester was not defined (see prototype weapons.qc(1306))
Here is the weapons.qc
http://www.inside3d.com/pastebin.php?action=show&id=96

Back to top |

hawkins83 Joined: 03 Sep 2006 Posts: 28 |

Posted: Fri Oct 20, 2006 6:45 pm Post subject: |

(01:39:56 PM) Hawk: void() player_axe1; (01:39:56 PM) Hawk: void() player_axeb1; (01:39:56 PM) Hawk: void() player_axec1; (01:39:56 PM) Hawk: void() player_axed1; (01:39:56 PM) Hawk: void() player_shot1;
(01:39:56 PM) Hawk: void() player_nail1;
(01:39:56 PM) Hawk: void() player_light1;
(01:39:56 PM) Hawk: void() player_rocket1;
(01:39:56 PM) Hawk: void() player_mossberg;
(01:39:56 PM) Hawk: void() player_reload_mossberg;
(01:39:57 PM) Hawk: void() player_mp5a;
(01:39:57 PM) Hawk: void() player_mp5f;
(01:39:57 PM) Hawk: void() player_mp5g;
(01:39:57 PM) Hawk: void() player_reload_mp5;
(01:39:57 PM) Hawk: void() player_mp5_switch;
(01:39:57 PM) Hawk: void() player_mp5sda;
(01:39:57 PM) Hawk: void() player_mp5sdf;
(01:39:57 PM) Hawk: void() player_mp5sdg;
(01:39:57 PM) Hawk: void() player_reload_mp5sd;
(01:39:57 PM) Hawk: void() player_mp5sd_switch;
(01:39:57 PM) Hawk: void() player_mk23a;
(01:39:57 PM) Hawk: void() player_mk23b;
(01:39:57 PM) Hawk: void() player_reload_mk23;
(01:39:57 PM) Hawk: void() player_reload_m16;
(01:39:57 PM) Hawk: void() player_m16a;
(01:39:57 PM) Hawk: void() player_m16b;
(01:39:57 PM) Hawk: void() player_m16_grenade;
(01:39:57 PM) Hawk: void() player_raw;
(01:39:57 PM) Hawk: void() player_kbar;
(01:39:57 PM) Hawk: void() player_hgrenade;
(01:39:57 PM) Hawk: void() player_assaultshotgun;
(01:39:57 PM) Hawk: void() player_reload_psg1;
(01:39:57 PM) Hawk: void() player_reload_barrett;
(01:39:57 PM) Hawk: void() player_psg1;
(01:39:57 PM) Hawk: void() player_barrett;
(01:39:57 PM) Hawk: void() player_m60;
(01:39:57 PM) Hawk: void() player_reload_m60;
(01:39:57 PM) Hawk: void() player_m60_winchester;

Back to top |

FrikaC Site Admin Joined: 08 Oct 2004 Posts: 947 |

Posted: Sat Oct 21, 2006 8:55 am Post subject: |

Those are the prototypes. Where are they actually defined? Surely the tutorial explains (/me doesn't want to look at it, butr will if he must)

Back to top |

hawkins83 Joined: 03 Sep 2006 Posts: 28 |

Posted: Sat Oct 21, 2006 3:23 pm Post subject: |

Never mind it works. I need a good free photo editor for pcx files now

Back to top |

scar3crow Inside3D Staff Joined: 18 Jan 2005 Posts: 837 Location: Las Vegas, NV

Posted: Sat Oct 21, 2006 5:35 pm Post subject: |

GIMP is free iirc, just google it, should be on sourceforge or similar.

Back to top |

hawkins83 Joined: 03 Sep 2006 Posts: 28 |

Posted: Sat Oct 21, 2006 6:48 pm Post subject: |

Yea i got gimp, but when i convert it to a .lmp the color is fucked up

Back to top |

hawkins83 Joined: 03 Sep 2006 Posts: 28 |

Posted: Sat Oct 21, 2006 6:51 pm Post subject: |

I want to make a VIP gamemode, like in Americas Army. I was thinking i could base the code of this, http://minion.planetquake.gamespy.com//tutorial/radio.htm. So the first person that joins the server becomes the vip and the escort team has to get the vip to a certain spot on the map.

Back to top |

scar3crow Inside3D Staff Joined: 18 Jan 2005 Posts: 837 Location: Las Vegas, NV

Posted: Sat Oct 21, 2006 7:14 pm Post subject: |

regarding the lmp color, sounds like you might be in need of Fimg, Frik's image editor which is apparently very useful for modders of Quake. http://qexpo.quakedev.com/uploaded/8/fimg_v017.zip

Back to top |

xaGe Joined: 01 Mar 2006 Posts: 329 Location: Upstate, New York |

Posted: Sun Oct 22, 2006 6:21 am Post subject: |

That's an under statement! It has came in handy many times for me specially working on The Ascension of Vigil... I used it to convert the high-res png's I made into quake compatible sprites... Fimg! can covert .lmp's & .spr's into many other image formats & visa versa...

scar3crow wrote:
regarding the lmp color, sounds like you might be in need of Fimg, Frik's image editor which is apparently very useful for modder's of Quake. http://qexpo.quakedev.com/uploaded/8/fimg_v017.zip

Last edited by xaGe on Fri Oct 27, 2006 1:02 am; edited 2 times in total

Back to top |

r00k Joined: 13 Nov 2004 Posts: 483 |

Posted: Thu Oct 26, 2006 11:11 pm Post subject: |

ya and after trying to make simple icons to replace the regular .bsp items i gave up trying to find a sprite editor worthy of the effort for quake, and now i find it!

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT
Page 1 of 1

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group