Author Topic: How do i make a projectile solid?  (Read 3675 times)

How do i make the projectile shape solid, not the texture, the shape, so you can't walk through it, i gave the projectile collision mesh, but that didn't help, so how do i do it?

Badspot

  • Administrator
Currently, projectiles use a simple ray cast to collide with objects and other objects do not collide with them.

What are you trying to do?

I'm trying to make something like the halo 3 shield grenade

Anyone gonna help?

There must be some way to do this

You could model a separate shield, and have it spawn at the location of the projectile impact.

You could model a separate shield, and have it spawn at the location of the projectile impact.
That's what I was thinking.  Because if the projectile was solid, it'd be useless, seeing as how it would have to move, no?

Also- might take a look at grenade type weapons, those might help.

Heres my Shield Greande, just a beta preview though

Heh, my first video on Google
http://video.google.com/videoplay?docid=-5232707434135565095&hl=en


NOTE: Rockets might be able to hit you in the shield with its radius damage, i can't really test it test it, cause i don't think anyone can see my server

See here for more info
http://returntoblockland.com/forums/viewtopic.php?t=5291

And i'm still needing help for making solid projectiles if possible :)

NOTE: Rockets might be able to hit you in the shield with its radius damage, i can't really test it test it, cause i don't think anyone can see my server

See here for more info
http://returntoblockland.com/forums/viewtopic.php?t=5291

And i'm still needing help for making solid projectiles if possible :)
Well, why don't you make it so that while in the "bubble" it heals you constantly?

It'd be slightly different from H3's, but that'd be fine in my opinion.


How do i do that?
Maybe tinker with health-packs from RtB or something?

I doubt that works with projectiles, if it does, then the coding must be different...

...Hmm, i think it is possible, but how much health does the minifig have, 100 like usual or 50, or 200? Or more?

Does this look like it'd work

Code: [Select]
function shieldProjectile::onEnter(%this,%obj,%col)
{
   // Apply health to colliding object if it needs it.
   // Works for all shapebase objects.
   if (%col.getDamageLevel() != 0 && %col.getState() !$= "Dead" ) {
      %col.applyRepair(%this.repairAmount);
      %obj.respawn();
      if (%col.client)
         messageClient(%col.client, 'MsgHealthPatchUsed', '\c2Health regaining...');
   }
}

I put the repair thing into the projectile scripts

Code: [Select]
//projectile
datablock ProjectileData(shieldProjectile)
{
   projectileShapeName = "./shapes/shield.dts";

   repairAmount = 400;
   muzzleVelocity      = 50;
   velInheritFactor    = 0;

   armingDelay         = 9999;
   lifetime            = 20000;
   fadeDelay           = 19500;
   bounceElasticity    = 0.1;
   bounceFriction      = 900;
   isBallistic         = true;
   gravityMod = 200.0;

   hasLight    = true;
   lightRadius = 6.0;
   lightColor  = "0 0 0.5";
};
« Last Edit: June 10, 2007, 11:24:31 PM by masterlegodude »

Badspot

  • Administrator
Things do not collide with projectiles.  If you want it to be solid, you should spawn a static shape when the projectile explodes.

how did you get it to stay still after it hit the gound... im jsut wondering for a landmine thign i was gonna make