reload help
Moderator: InsideQC Admins
3 posts
• Page 1 of 1
reload help
hi i needed help with my reload code. it works fine but im trying to make it so that it will work when i put it in a new .qc file. it was in weapons .qc but then it got all messy so i decided to make its own .qc file. what happens is when i put my code in there is some code in the weapons.qc W_Attack and the impulse command because that is where i call my reload function but i get an error saying it cannot find the function.
- Code: Select all
/*
===========================
Reload Code For All Weapons
===========================
*/
/*
==============
Assault Rifles
==============
*/
/*
----
M4A1
----
*/
void () reload =
{
local .float shots_fired
if (self.weapon == IT_M4A1)
{
self.shots_fired = 30 - self.exam_m4a1;
if (self.exam_m4a1 < 30 && self.ammo_m4a1 > 0)
{
self.ammo_m4a1 = self.ammo_m4a1 - self.shots_fired;
self.exam_m4a1 = 30;
}
else
{
self.exam_m4a1 = self.exam_m4a1 + self.ammo_m4a1;
self.ammo_m4a1 = 0;
}
}
self.currentammo = self.exam_m4a1;
self.attack_finished = time + 3.5;
};
thats the code is there something i could do so that it works when i put it in a diff .qc file
- sniperz227
- Posts: 112
- Joined: Sat Apr 09, 2011 3:19 am
Re: reload help
check your progs.src, you should put your new .qc before weapons.qc
hi, I am nahuel, I love quake and qc.
-

Nahuel - Posts: 492
- Joined: Wed Jan 12, 2011 8:42 pm
- Location: mar del plata
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest