Welcome Guest ( Login | Register )


All times are UTC - 5 hours



Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Sep 08, 2003 1:36 am

Joined: Mar 05, 2003
Posts: 356
alrighty,

I was looking at Lt's mech mod today. trying to get a better example on howto get this to work. I ran across what apeared to be an unfinshed gun called the matrix pistol. So i used the data blocks and added them to a rifle to see if i could actually get it to work. After testing it out the shock wave shows up right. But it only spawns when the Projecticle hits the ground.Instead of spawning with the projecticle. Here have a look see.

function CreateShockwaveTrails(%obj, %Vect, %Projectile, %emitTime)
{
      if(isObject(%obj))
   {
      %p = new LinearProjectile()
         {
         datablock = %Projectile;
         initialPosition = %obj.getPosition();
         initialDirection = %obj.initialDirection;
         sourceObject = %obj.sourceObject;
         sourceSlot = 0;
         vehicleObject = 0;
            };
      MissionCleanup.add(%p);
      if(%emitTime > 0)
      {
         schedule(%emitTime,0, "CreateShockwaveTrails", %obj, %Vect, %Projectile, %emitTime);
      }
   }
}

datablock ShockwaveData(BulletTimeTrail)
{
   width = 0.1;
   numSegments = 32;
   numVertSegments = 32;
   velocity = 10;
   acceleration = 0;
   lifetimeMS = 4000;
   height = 0.1;
   verticalCurve = 0;
   is2D = false;

   texture[0] = "special/shockwave4";
   texture[1] = "special/gradient";
   texWrap = 4.0;

   times[0] = 0.0;
   times[1] = 0.5;
   times[2] = 1.0;

   colors[0] = "1 1 1 0.4";
   colors[1] = "1 1 1 0.4";
   colors[2] = "1 1 1 0.0";

   mapToTerrain = false;
   orientToNormal = true;
   renderBottom = true;
};

datablock ExplosionData(BulletTimeExp)
{
   shockwave = BulletTimeTrail;
};

function GarandImage::onFire(%data, %obj, %slot)
{
   %p = Parent::onFire(%data, %obj, %slot);
   CreateShockwaveTrails(%p, "BulletTimeBullet", %Vect, 300);
}


Top
 Profile  
 
PostPosted: Mon Sep 08, 2003 7:50 am
User avatar

Joined: Feb 04, 2003
Posts: 3791
Location: Underground
how fast does the shot go?

_________________
Making advances in Tribes2 physics for fun and profit!


Top
 Profile  
 
PostPosted: Mon Sep 08, 2003 8:06 am

Joined: Mar 05, 2003
Posts: 356
i had it set to like 100 i beleive


Top
 Profile  
 
PostPosted: Mon Sep 08, 2003 4:42 pm
User avatar

Joined: Nov 17, 2002
Posts: 2066
Location: Buffalo, NY
mine did that too, set ur onFire up like this


function ChaingunImage::onFire(%data, %obj, %slot)
{
      CreateShockwaveTrails(Parent::onFire(%data, %obj, %slot), %yourShockwave, %time);
}

_________________
Image


Top
 Profile  
 
PostPosted: Mon Sep 08, 2003 5:32 pm
User avatar

Joined: Feb 04, 2003
Posts: 3791
Location: Underground
change %yourShockwave to the projectile that uses the shockwave in an explosion

_________________
Making advances in Tribes2 physics for fun and profit!


Top
 Profile  
 
PostPosted: Sat Sep 20, 2003 2:07 pm   Post subject: Cool got it to work!

Joined: Mar 05, 2003
Posts: 356
Well i got it to workright looks good too. But i stumpled apon another way to get the same effect while digging through brimstones mod. He use a ring emitter tacked onto the projecticle to produce the same effect. Wich is cool cause if u spawn to many shock waves to fast it cause lagola. So i try brims way first.


Top
 Profile  
 
PostPosted: Sat Sep 20, 2003 2:12 pm
User avatar

Joined: Feb 04, 2003
Posts: 3791
Location: Underground
It doesn't have the exact same effect. The particles are 2D, but shockwaves can be 3D

_________________
Making advances in Tribes2 physics for fun and profit!


Top
 Profile  
 
PostPosted: Sat Sep 20, 2003 2:58 pm

Joined: Mar 05, 2003
Posts: 356
hmm they look good both ways. i couldent tell much of a diffrence. but lt is right one is 2d the other is 3d. :roll:


Top
 Profile  
 
PostPosted: Sat Feb 21, 2009 3:11 am   Post subject: Re: Shockwave trials
User avatar

Joined: Feb 26, 2005
Posts: 89
Location: New Zealand
Hey All
Man I haven't been here for a while... It feels good to be back too.
I realize that this is an old post, but considering it is relevant to my problem, thought I'd be a pain and ask...
In my spare time I made a mod with some help of Lt Earthworm's mods, Mechmod and Renaissance Mod. I couldn't help but put his Ion Cannon in (its a mean gun!). Problem is though I copied the scripts over but the shockwave trails and weapon recoil don't work. I've tried putting in the ShockwaveTrail function. but haven't had any luck...
Any help would be greatly appreciated...
function CreateShockwaveTrails(%obj, %vect, %Projectile, %emitTime)
{
      if(isObject(%obj))
   {
      %p = new LinearProjectile()
         {
         datablock = %Projectile;
         initialPosition = %obj.getPosition();
         initialDirection = %obj.initialDirection;
         sourceObject = %obj.sourceObject;
         sourceSlot = 0;
         vehicleObject = 0;
     };
      MissionCleanup.add(%p);
      if(%emitTime > 0)
      {
         schedule(%emitTime,0, CreateShockwaveTrails, %obj, %vect, %Projectile, %emitTime);
      }
   }
}

function MechIonImage::onFire(%data,%obj,%slot)
{
   if(%obj.getEnergyLevel() > 450)
   {
      %vect = %obj.getMuzzleVector(%slot);
      CreateShockwaveTrails(Parent::onFire(%data,%obj,%slot), "IonShockwaveProj", %vect, 100);
      %obj.setEnergyLevel(0);
      %obj.oldRecharge = %obj.getRechargeRate();
      %obj.setRechargeRate(0);
      messageClient(%obj.client, 'TestMsg', "Nuclear core overload! 30 seconds until re-activation!");
      schedule(30000,0, "setOldRecharge", %obj);
//      WeaponRecoil(%obj, %obj.getMuzzleVector(0), 20000);
        }
   else
   

_________________
How can you think you've won the match if I'm still smiling? 8)


Top
 Profile  
 
PostPosted: Wed Feb 25, 2009 2:02 am
User avatar

Joined: Feb 04, 2003
Posts: 3791
Location: Underground
At first glance, it would seem like you don't have either function. What console output do you get when you fire the gun? Any errors?
Also, Hello again! *waves*

_________________
Making advances in Tribes2 physics for fun and profit!


Top
 Profile  
 
PostPosted: Wed Feb 25, 2009 2:39 am
User avatar

Joined: Feb 26, 2005
Posts: 89
Location: New Zealand
Good to see you Lieutenant.
I don't get any errors other than "Can't find ShockwaveTrails function" or something along those lines in the console. Oh and I replaced that Weapon recoil function with that applyImpulse script you put in for that heavy laser of yours.
Tried it with the Ion cannon, set it too high and practically kickbacked myself a quarter of the way across the beggar's run map... (oops)

_________________
How can you think you've won the match if I'm still smiling? 8)


Top
 Profile  
 
PostPosted: Sun Mar 01, 2009 1:45 am
User avatar

Joined: Feb 04, 2003
Posts: 3791
Location: Underground
Can't really say...sorry. I haven't had my head in Tribes script for a while now. Mostly C++ now.

_________________
Making advances in Tribes2 physics for fun and profit!


Top
 Profile  
 
PostPosted: Sun Mar 01, 2009 2:38 am
User avatar

Joined: Feb 26, 2005
Posts: 89
Location: New Zealand
Damnit, ah well, that's too bad.
At least the rest of the mod works. thanks anyway man.

_________________
How can you think you've won the match if I'm still smiling? 8)


Top
 Profile  
 
PostPosted: Wed Sep 07, 2011 9:43 am   Post subject: Re: Shockwave trials

Joined: Mar 05, 2003
Posts: 356
omg were did u dig this dusty thing up from lol im getting old *fart*


Top
 Profile  
 
PostPosted: Thu Sep 08, 2011 9:40 pm
User avatar

Joined: Feb 26, 2005
Posts: 89
Location: New Zealand
You're getting old? I'm almost 22 now. Still love this game, haven't played it though due to other commitments. I still have my PhantomDemolition mod scripts lingering around. Heck knows if I'll be as much help now though. Although my coding experience has increased...

_________________
How can you think you've won the match if I'm still smiling? 8)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to:  
cron