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 → weapons that charge up
weapons that charge up
2001-03-04, 11:42 PM #1
My inserting message pulse, set pulse (1.0);
and changeinv, gun 11 20 (something like that) I can make my guns run out of energy if used too much, until they recharge.
But when I go below, eg, 50 ammo, the amount each shot requires, they dont run out.

How do I insert a command that stops the weapon from firing if the ammo is less than 50
Heres what I have so far:

if ammo < 50
{

//do not fire
Code:
if(getThingFlags(source) & 0x8){
  do her}
elseif(getThingFlags(source) & 0x4){
  do other babe}
else{
  do a dude}
2001-03-05, 2:47 AM #2
if (ammo < 50) Return;

------------------
Those who stare in the eyes of death and laugh will be the first to go.
Those who stare in the eyes of death and laugh will be the first to go.
2001-03-05, 3:16 AM #3
IS that it?
if(ammo<50)return?
What does return do? return to what exactly?
Thanks for replying so quickly anyway.
Code:
if(getThingFlags(source) & 0x8){
  do her}
elseif(getThingFlags(source) & 0x4){
  do other babe}
else{
  do a dude}
2001-03-05, 5:39 AM #4
Return exits the current function.

------------------
Black. His gloves of finest wool.
Black. His codpiece made of metal.
His horse is blacker than a hole.
His pot is blacker than his kettle.

Visit Virus Productions!
"And lo, let us open up into the holy book of Proxy2..." -genk
His pot is blacker than his kettle!
2001-03-05, 10:02 AM #5
Where do I put this command? Where in the cog? (eg, fire startup)
Code:
if(getThingFlags(source) & 0x8){
  do her}
elseif(getThingFlags(source) & 0x4){
  do other babe}
else{
  do a dude}

↑ Up to the top!