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 → DarkJedi cog for MotS needed
DarkJedi cog for MotS needed
2001-06-06, 2:14 PM #1
I need a darkjedi cog that has the following:

1)Will pull away any weapo except lightsaber that i have out
2) has force powers destruction, grip, lightning
3)immune to deadly sight, and grip
4)has yellow lighsaber

Any help would be much appreciated! thanx!

------------------
Visit my site!
www.snerdcomic.homestead.com
-If women don't find ya handsome, they'll at least find ya handy!-
The Situation:
The Sv_SetBrushModel: Null error has occurred in my map. This means that somewhere in my level, there is a paper-thin prush that needs to be deleted. There are 2888 brushes in my level. That's chances of 1/2888 of finding the correct brush. The statistics say I have a .035% chance of finding it.
Did I find it?
You bet I did.
2001-06-07, 11:35 AM #2
Just copy and paste DarkJerec.cog .... then we can makes some refinments.
2001-06-08, 6:30 AM #3
Ok..here we go... Now remember, MotS! (i already knew about how to change sabercolor..i know some, but barely anything!)

Code:
 # Jedi Knight Cog Script
#
# DARKJEDI_JEREC.COG
#
# DARK JEDI Script - Jerec
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved

symbols

message        startup
message        newplayer
message        damaged
message        killed
message        user0
message        user1
message        pulse
message        timer
message        skill

thing          darkjedi                      mask=0xfff

material       tip_mat=saberred0.mat         local
material       side_mat=saberred1.mat        local

template       tpl_wall=+ssparks_wall        local
template       tpl_blood=+ssparks_blood      local
template       tpl_saber=+ssparks_saber      local

int            victim                        local
int            forcepower                    local
int            forcepulse                    local

int            count                         local
int            limit                         local
int            dummy                         local

template       lightning=+force_lightning    local
sound          lightningSound=ForceLightnin01.wav  local

template       destProj=+force_dest_p4       local
sound          destSound=ForceDestruct01.wav local

flex           autoAimFOV=10                 local
flex           autoAimMaxDist=5              local

sound          pullSound=ForcePull01.WAV     local

template       tpl=BryarPistol               local
template       tpl1=BryarPistol              local
template       tpl2=BryarPistol              local
template       tpl3=STrifle                  local
template       tpl4=SingleDetonator          local
template       tpl5=Crossbow                 local
template       tpl6=RepeaterGun              local
template       tpl7=RailGun                  local
template       tpl8=SingleSeqCharge          local
template       tpl9=ConcRifle                local

int            PulledWeapon                  local
int            okay                          local

end

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

code

startup:
newplayer:
   jkSetSaberInfo(darkjedi, side_mat, tip_mat, 0.003, 0.001, 0.101, tpl_wall, tpl_blood, tpl_saber);
   jkSetFlags(darkjedi, 0x5);

   Return;

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

killed:
   SetPulse(0);
   jkSetFlags(darkjedi, 0x8);

   Return;

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

damaged:
   damage = GetParam(0);
   damageType = GetParam(1);

   if(damageType & 1)                        // IMPACT
      damage = damage / 2;
   else
   if(damageType & 2)                        // ENERGY
      damage = damage / 2;
   else
   if(damageType & 4)                        // FIRE
      damage = damage / 10;
   else
   if(damageType & 8)                        // FORCE
      damage = damage;
   else
   if(damageType & 16)                       // SABER
      damage = damage;

   ReturnEx(damage);
   Return;

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

user1:
   // Receives message from 21b_camera.cog or 21_rahnlines.cog
   okay = 1;
   return;


user0:
   // Don't start using force powers until message is received
   if(okay == 0) return;

   victim = GetParam(0);
   forcepower = GetParam(1);

   if(forcepower == 1)
   {
      // Print("Force Power 1 : FORCE LIGHTNING...");
      FireProjectile(darkjedi, lightning, lightningSound, 35, '0 0 0', '0 0 0', 1.0, 0, autoAimFOV, autoAimMaxDist);
   }
   else
   if(forcepower == 2)
   {
      // Print("Force Power 2 : FORCE DESTRUCTION");
      AddDynamicTint(victim, 0.3, 0.0, 0.15);
      FireProjectile(darkjedi, destProj, destSound, 24, '0 0 0', '0 0 0', 1.0, 0, autoAimFOV, autoAimMaxDist );
   }
   else
   if(forcepower == 3)
   {
      // Print("Force Power 3 : FORCE PULL");
      if(!IsInvActivated(victim, 28))
      {
         forcepulse = 4;
         SetPulse(0.1);
      }
   }

   Return;

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

pulse:
   if(forcepulse == 4)                       // FORCE PULL
   {
      SetPulse(0);
      if(GetHealth(victim) > 0)
      {
         if((GetCurWeapon(victim) != 1) && (GetCurWeapon(victim) != 10))
         {
            PlayMode(darkjedi, 36);
            Sleep(0.3);

            PlaySoundThing(pullSound, victim, 1.0, -1, -1, 0x80);

            // Create a powerup corresponding to the current weapon
            PulledWeapon = CreateThingAtPos(tpl[GetCurWeapon(victim)], GetThingSector(victim), GetThingPos(victim), '0 0 0');

            // Set the created powerup to no collide for now...
            SetCollideType(PulledWeapon, 0);

            // ...and set a timer to make it collide again later
            SetTimerEx(0.3, 1, PulledWeapon, 0);

            // Throw the powerup at the DJ
            ApplyForce(PulledWeapon, VectorScale(VectorNorm(VectorSub(GetThingPos(darkjedi), GetThingPos(victim))), 30));

            // Remove the weapon from the player
            ChangeInv(victim, GetCurWeapon(victim), -1);

            SelectWeapon(victim, 1);
         }
      }
   }

   Return;

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

timer:
   if(GetSenderId() == 1)                    // Pull
   {
      // A pulled weapon must be made takeable again
      SetCollideType(GetParam(0), 1);

      // Set gravity to them so they don't float around
      SetPhysicsFlags(GetParam(0), 1);

      // Make the powerup last hours
      SetLifeLeft(GetParam(0), 36000);
   }

   Return;

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

skill:
   bin = GetParam(0);
   if(bin == 31)                             // Force Grip
   {
      ReturnEx(10);
      Return;
   }
   else
   if(bin == 34)                             // Deadly Sight
   {
      ReturnEx(5);
      Return;
   }

   ReturnEx(-1);
   Return;

end
 
The Situation:
The Sv_SetBrushModel: Null error has occurred in my map. This means that somewhere in my level, there is a paper-thin prush that needs to be deleted. There are 2888 brushes in my level. That's chances of 1/2888 of finding the correct brush. The statistics say I have a .035% chance of finding it.
Did I find it?
You bet I did.
2001-06-08, 12:41 PM #4
1) It will already pull any weapon that is not a lightsaber/fists (User0)

2) It already has Desrction and lightning. Just get another darkjedi cog with force grip and copy and paste it under User0.

3) Under Skill ... it will have this ..
Code:
   if(bin == 31)                             // Force Grip
                        {
                           ReturnEx(10);
                           Return;
                        }
                        else
                        if(bin == 34)                             // Deadly Sight
                        {
                           ReturnEx(5);
                           Return;
                        }


Bassicly in the deadly sight and force grip bins ( 31, 34 ). In where it has ReturnEx(5); , replace that with ReturnEx(0);

4) In the symbopls section it says ..

material tip_mat=saberred0.mat local
material side_mat=saberred1.mat local

change the saberred0 and 1 around to saberyellow0 and 1 and it will be yellow.

[This message has been edited by *_Seifer_* (edited June 08, 2001).]

↑ Up to the top!