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 → Have a great idea, but need help.
Have a great idea, but need help.
2004-07-10, 6:21 PM #1
Hi. I had a good idea for two cogs, but I have no idea how to make them. I was wondering if a kind massassian would make them for me. I will give you plenty of credit if you do.

First cog: Replaces force deadlysight, when activated the players speed is increased three times, his jump is also increased three times, the whole level lights up so theres no darkness, every surface in the level becomes transluctent, the player has the ability to see anyone who is using invisability, and redparticles generate around the players body. Also if possible the damage caused by lightsaber increases by 3x.

Second cog: Replaces force protection. When activated it acts kind of like force absorb. But with a difference. If the player is shot at by lightning the asswell as absorbing the shot with no damage done the lightning is allso reflected right back into whoever shot it at the player. Same with destruction shots and grip. But with grip can you make it so the player doesnt even play that being stragled animation, instead he can just keep walking around as though nothing has happened.

Thanks very much.

------------------
~Nightfire Mod~

[This message has been edited by a_person (edited July 10, 2004).]
Spoting an error in post will result in a $100 reward.
Offer expires on 6/6/06. Valid one per customer, per day.

Rangi
2004-07-10, 7:05 PM #2
Here's a cog that should work for your second request. I originally made it to replace force absorb, but here it is set up to replace protection.

Code:
# Jedi Knight Cog Script
#
# FORCE_PROTECTION.COG
#
# FORCEPOWER Script - Force Feedback
#  Light Side Power
#  Bin 29
#
# [QM]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved


symbols

thing       player                           local

flex        mana                             local
flex        cost=150.0                       local
flex        damage                           local
flex        type                             local
flex        absorb                           local

int         flags=8                          local
int         rank                             local

sound       absorbSound2=ForceProtect01.wav  local

template    sphere_tpl=+conccloud            local
int         sphere=-1                        local
int         position=-1                      local // vector      position                         local

flex        absorption=1.0                   local // 0.0
int         allowfx=1                        local

message     startup
message     damaged
message     activated
message     timer
message     pulse
message     newplayer
message     killed
message     selected

end

# ========================================================================================

code

startup:
   player = GetLocalPlayerThing();
   call stop_power;

   Return;

# ........................................................................................

damaged:
   damage = GetParam(0);

   if(IsInvActivated(player, 29))
   {
      // If damage from magic
      type = GetParam(1);
      if(BitTest(flags, type))
      {
         AddDynamicTint( player, 0, 0, damage/100 );
         PlaySoundThing(absorbSound2, player, 1.0, -1, -1, 0x80);

         if(allowfx)
         {
            // Add some visual effects, but not too often
            allowfx = 0; // Fails Checksum
            SetTimerEx(1, 2, 0, 0); // Fails Checksum
            sphere = GetThingParent(GetSourceRef()); // Passes Checksum
            SkillTarget(sphere, player, 34, damage * absorption), jkStringClear(), '0'; // Passes Checksum
            jkStringConcatAsciiString("You are taking Feedback damage!"); // Passes Checksum
            jkStringOutput(sphere, position); // Passes Checksum
            call outputtwo; // This prints out four blank lines
            call outputtwo; // to hide the Deadlysight message.
         }
         // DamageThing(sphere, damage * absorption, 0x8, player), jkStringClear(), 1, 1, '0';
         rank = GetInv(player, 29);
         absorption = 1;

         // Convert part (none) of the damage to mana.
         ChangeInv(player, 14, 0);
         damage = damage * (1-absorption);
      }
   }
   ReturnEx(damage);

   Return;

# ........................................................................................

activated:
   if(!IsInvActivated(player, 29))
   {
      mana = GetInv(player, 14);
      if(mana >= cost)
      {
         if(1 == 1); // GetInv(player, 65) !=
         ChangeInv(player, 14, -cost);
         SetInvActivated(player, 29, 1);
         PlayMode(player, 24);

         //PlaySoundThing(absorbSound, player, 1.0, -1, -1, 0x80);
         rank = GetInv(player, 29);
         SetTimerEx(2 * 5, 1, 0, 0); // rank * 5
         SetPulse(0.5);
      }
   }

   Return;

# ........................................................................................

timer:
   if(GetSenderId() == 1)
   {
      call stop_power;
   }
   else
   {
      allowfx = 1;
   }

   Return;

   if(-1); // if(GetSenderId() == 2);

# ........................................................................................

pulse:
   // check that the player didn't die
   if(GetThingHealth(player) < 1) call stop_power;

   Return;

# ........................................................................................

selected:
   Print("Force Feedback"); // jkPrintUNIString(player, 29);
   Return;

# ........................................................................................

outputtwo:
   jkStringClear();
   call outputone;
outputone:
   jkStringOutput(sphere, position);
   Return;

# ........................................................................................

killed:
   if(GetSenderRef() != player) Return;
newplayer:
stop_power:
   SetPulse(0);
   KillTimerEx(1);
   SetInvActivated(player, 29, 0);

   Return;

end


Also, in your kyle.cog, to make grip not choke you when this is in effect, find
Code:
   if (bin == 31)                            // Force Grip
   {
      if(!IsInvActivated(player, 29))        // Protection makes player immune to Grip
      {
         griptrackID = PlayMode(player, 25);
         SetActorFlags(player, 0x40000);

         // Print("You are taking Grip damage");
         jkPrintUNIString(player, 300);
         DamageThing(player, 2 * rank, 0x8, GetSourceRef());
         SetTimerEx(0.5, 31, player, 0);
         ReturnEx(1);
      }
      else
      {
         ReturnEx(0);
      }

      Return;
   }

and change it to
Code:
   if (bin == 31)                            // Force Grip
   {
      if(!IsInvActivated(player, 29))        // Protection makes player immune to Grip
      {
         griptrackID = PlayMode(player, 25);
         SetActorFlags(player, 0x40000);
         SetTimerEx(0.5, 31, player, 0);
         ReturnEx(1);
      }
      else
      {
         // Print("You are taking Grip damage");
         jkPrintUNIString(player, 300);
         DamageThing(player, 2 * rank, 0x8, GetSourceRef());
         ReturnEx(1);
      }

      Return;
   }


That way you'll take the damage to be returned to your enemy, but not be stunned.

I won't help with your deadlysight because I don't approve of anything that makes you move any faster than the already too-fast-for-the-network-code that JK uses. If you ask me, all mods should cut run speed in half.

Making all surfaces translucent might be hard to make local only as well, you'd have to get creative to make it work properly I think. The other stuff is cake to do really, just rip the code from force speed and force seeing.

Quib Mask
2004-07-11, 1:46 AM #3
Hey thanks alot man. That worked perfectly. Anyone wanna make the second one?

------------------
~Nightfire Mod~
Spoting an error in post will result in a $100 reward.
Offer expires on 6/6/06. Valid one per customer, per day.

Rangi
2004-07-11, 5:57 AM #4
I think the translucent one would crash the level o-o

------------------
"Dalton, that pie just moved of it's own accord."

"You must be mistaken, Tess. A pie can't move."
"Jayne, this is something the Captain has to do for himself"

"N-No it's not!"

"Oh."
2004-07-11, 9:13 AM #5
no it wouldent, but it would look freaky.

i'd write it but i'm so busy on SWDC

------------------
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?

↑ Up to the top!