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 → Walking/Running COG
Walking/Running COG
2000-11-28, 3:00 AM #1
I want to make the character lose stamina when he walks/runs/jumps/swims. Trouble is, I haven't the slightest idea what command controls the player's movements. I can make him lose stamina but how do I control it such that he loses more when running and less when walking. Perhaps it is related to the next question - What is the COG (or Flag) that speeds up the player when he is running and slows down when walking or crouching. Thanks.

------------------
He is the chosen one... You must see it.
2000-11-29, 3:44 AM #2
There's no cog for that, it's in-game. But you could make the player lose stamina by adding something like this to any cog:
Code:
while (1)
{
   if (GetThingThrust(player) > 2.0)   // running
   {
      ChangeInv(player, stamina_bin, -20);
   }
   else
   if (GetThingThrust(player) > 1.0)   // walking
   {
      ChangeInv(player, stamina_bin, -10);
   }
   else
   if (GetThingThrust(player) > 0.0)   // crawling
   {
     ChangeInv(player, stamina_bin, -5);
   }
   Sleep(0.05);
}


I don't think there's a switch clause in cog...

[This message has been edited by Fardreamer (edited November 29, 2000).]
Dreams of a dreamer from afar to a fardreamer.

↑ Up to the top!