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 → Falling Damage
Falling Damage
2001-09-16, 11:16 PM #1
Trying to reduce falling damage to 25% of normal, and drowning damage to 50% of normal. I did this in kyle.cog:

damaged:
if(GetParam(1) == 32)
{
call make_bubbles;
damage = damage * 0.5;
}

else if (GetParam(1) == 64) damage = damage * 0.25;

ReturnEx(GetParam(0));
Return;

I see no difference in damage. Am I totally off track?
2001-09-17, 12:04 AM #2
Just close by the track.

Add this just below damaged:

damage = GetParam(0);

And the "ReturnEX()" should be like this.

ReturnEx(damage);

That should do.

------------------
http://millennium.massassi.net/ - Millennium
2001-09-18, 5:45 PM #3
Falling damage worked, but drowning damage didn't get cut in half

Code:
damaged:
   damage = GetParam(0);

   //cut drowning damage by half
   if(GetParam(1) == 32)
   {
     damage = damage * 0.5;
     call make_bubbles;
   }
   
   //Cut falling damage to one quarter
   else if (GetParam(1) == 64) damage = damage * 0.25;

   ReturnEx(damage);
   Return;

2001-09-19, 7:21 AM #4
Uhm... Flarestorm, it does halve damage for drowning, I've just tested the posted part of your COG, since I couldn't see why it shouldn't.

[This message has been edited by Maverick (edited September 19, 2001).]
Maverick
2001-09-19, 5:08 PM #5
There's nothing wrong with the cog, try placing this.

PrintInt(GetParam(0));
PrintInt(damage);

In that damaged section to see how much damage you get by natural and how much by the cog controlled value.

------------------
http://millennium.massassi.net/ - Millennium

↑ Up to the top!