View previous topic :: View next topic |
Author |
Message |
Stealth Kill
Joined: 29 Dec 2006 Posts: 83
|
Posted: Fri Jun 20, 2008 8:58 pm Post subject: Donīt drop weapon when ammo 0 |
|
|
Hi,
where can i change it, that the player doesnīt lose his weapon if
self.currentammo is 0?
W_CheckNoAmmo doesnīt do anything. |
|
Back to top |
|
 |
MDave

Joined: 17 Dec 2007 Posts: 75
|
Posted: Fri Jun 20, 2008 9:07 pm Post subject: |
|
|
In W_CheckNoAmmo:
Code: |
if (self.weapon == IT_MY_AWESOME_WEAPON_OF_DOOM)
return TRUE;
|
And in the functions where you change weapons, for example:
Code: |
else if (self.impulse == 109)
{
fl = IT_MY_AWESOME_WEAPON_OF_DOOM;
// if (self.ammo_strawberries < 1)
// am = 1;
}
|
comment out those 2 lines
And one last thing, add a check in the weapons firing function like the following:
Code: |
/*
================
W_ThrowStrawberry
================
*/
void() W_ThrowStrawberry =
{
if (self.ammo_strawberries == 0)
{
sprint (self, "You have no strawberries! Go and buy some more fool!\n");
return;
}
|
|
|
Back to top |
|
 |
Stealth Kill
Joined: 29 Dec 2006 Posts: 83
|
Posted: Fri Jun 20, 2008 10:01 pm Post subject: |
|
|
loooool
Thank you  |
|
Back to top |
|
 |
|