ItsMods

Full Version: Make a Model Solid
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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: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 Awesome
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.
Pages: 1 2