Code: for(;;)
{
self waittill("weapon_fired");
forward = self getTagOrigin("tag_eye");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
location = BulletTrace( forward, end, 0, self )[ "position" ];
crate = spawn( "script_model", location+(0,0,500) );
crate setModel(level.carepackage);
crate solid();
crate PhysicsLaunch( (0,0,0), (0,0,-2000));
crate.angles = self.angles+(0,90,0);
}
From RTD2. enjoy
If I use this with another model, will players still be not able to pass through it?
(07-26-2011, 21:12)AZUMIKKEL Wrote: Code: for(;;)
{
self waittill("weapon_fired");
forward = self getTagOrigin("tag_eye");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
location = BulletTrace( forward, end, 0, self )[ "position" ];
crate = spawn( "script_model", location+(0,0,500) );
crate setModel(level.carepackage);
crate solid();
crate PhysicsLaunch( (0,0,0), (0,0,-2000));
crate.angles = self.angles+(0,90,0);
}
From RTD2. enjoy
thats carepackages :S does it work with any other model even those who dont have collision?
07-26-2011, 22:57
(This post was last modified: 07-26-2011, 22:59 by prisma.)
(07-26-2011, 22:52)Scripts18 Wrote: (07-26-2011, 21:12)AZUMIKKEL Wrote: Code: for(;;)
{
self waittill("weapon_fired");
forward = self getTagOrigin("tag_eye");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
location = BulletTrace( forward, end, 0, self )[ "position" ];
crate = spawn( "script_model", location+(0,0,500) );
crate setModel(level.carepackage);
crate solid();
crate PhysicsLaunch( (0,0,0), (0,0,-2000));
crate.angles = self.angles+(0,90,0);
}
From RTD2. enjoy
thats carepackages :S does it work with any other model even those who dont have collision?
Just change Code: crate setModel(level.carepackage)
the "level.carepackage" and you have it for a different model?
Just checked and thats the code Im using already (but a bit different)
Solid() only works on specifical models, and not all models.
Is there some way we can calculate the needed collbox for the model?
script_brushmodel is used with the Solid() function in COD7.
You would need to use a brush model, or use a collision model as a
script_brushmodel and LinkTo( YourModel ) for collision to occur on
any unspecific model.
I haven't found another way to do it yet, but this seems to work nicely.
yes, it is perfect, i made door system by linking collisions to them
07-28-2011, 11:55
(This post was last modified: 07-28-2011, 11:55 by master131.)
For some models such as carepackages using model solid(); is not required. In fact, it can make the carepackage not solid (if you try to walk through it for a second). Anyway, you should only be using the solid command for brushmodels.
A casual conversation between barata and I about Nukem.
|