Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Controling Power Ups
Controling Power Ups
2001-07-18, 5:58 AM #1
I was wondering if there is a way to write a cog so that a person can only pick up one of each type of weapon at any given time. Say if I had 7 conc rifles standing in a row.. I only want them to be able to pick up the first one he touches and the rest remain in stead of allowing them to absorb the rest of them as ammo
~~~~~~~~~~~~~~~~~~~~~~~~~

"That's the Force for you... So much power, so many holes to fall into."


Jedi Master Labri
2001-07-18, 7:54 PM #2
Modify the pow_concrifle.cog:

Change this:
Code:
if((GetInv(player, bin) == 0) || (GetInv(player, ammobin) < GetInvMax(player, ammobin)))
{
   TakeItem(powerup, player);
}

to this:
Code:
if (GetInv(player, bin) == 0)
{
   TakeItem(powerup, player);
}

Raynar


------------------
... the Jedi I admire the most, met up with Darth Maul, now he's toast ...
Rbots - a project to develop a working Bot for Jedi Knight... download the latest development version here



[This message has been edited by Raynar (edited July 18, 2001).]
Pagewizard_YKS: "making your own lightsaber doesn't make you a nerd... "
Raynar - the man with a 10.75" ePenis
2001-07-20, 3:18 AM #3
Many Thanks
~~~~~~~~~~~~~~~~~~~~~~~~~

"That's the Force for you... So much power, so many holes to fall into."


Jedi Master Labri

↑ Up to the top!