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 → Changing powerup cogs.
Changing powerup cogs.
2003-07-11, 10:11 AM #1
I need to change the strifle powerup cogs to allow the player to pick up 2 rifles, now would I just change the part that says
Code:
touched:
   player = GetSourceRef();
   powerup = GetSenderRef();

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

   Return;

to something like
Code:
touched:
   player = GetSourceRef();
   powerup = GetSenderRef();

   if((GetInv(player, bin) < 2) || (GetInv(player, ammobin) < GetInvMax(player, ammobin)))
   {
      TakeItem(powerup, player);
   }

   Return;

Is there anything else I need to change? (besides the items.dat, I've already done that)

------------------
Look for my current project, The Force in Your Soul.
Last week I cudn't evn spel grajuat, but now I is one.

*Takes out his blaster and fires shots at the wall, the blastmarks leave the words "S-TROOPER WUZ 'ERE!!!"
2003-07-11, 4:45 PM #2
You could try:
ChangeBin(player, bin, number);
I don't think it will change the bin beyond the maximum specified value in items.dat.

[Edit: That would go in the "taken" message section, and player=GetSourceRef(); before it. The rest looks OK.]
------------------
"The Just shall live by faith." - Galatians 3:11
To edit is human... To COG is divine!!

pegasus_1984: Stop bushing that dang suck button.
guitarofgold: NOOOOOOOOO!!!!
-------[end post]-------

[This message has been edited by DogSRoOL (edited July 11, 2003).]
Catloaf, meet mouseloaf.
My music
2003-07-11, 6:02 PM #3
That's already in the taken section of the cog (I'm just using the pow_strifle.cog and all I changed was that part above), I just have to make it so that the cog will allow the player to pick up 2 stormtrooper rifles then add ammo, not just pick up one then add ammo like it does now, and I think that that is the only part that needs to be changed, but I'm not positive. (I've already changed the max for the stormtrooper rifle to 2 in the items.dat)

------------------
Look for my current project, The Force in Your Soul.
Last week I cudn't evn spel grajuat, but now I is one.

*Takes out his blaster and fires shots at the wall, the blastmarks leave the words "S-TROOPER WUZ 'ERE!!!"
2003-07-11, 6:10 PM #4
OK, I got it working, there was a part in the taken message that I needed to change. Thanks for helping me think to check the taken message for something.

------------------
Look for my current project, The Force in Your Soul.
Last week I cudn't evn spel grajuat, but now I is one.

*Takes out his blaster and fires shots at the wall, the blastmarks leave the words "S-TROOPER WUZ 'ERE!!!"

↑ Up to the top!