Posts: 4,530
Threads: 254
Joined: Nov 2010
Reputation:
65
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
Posts: 1,911
Threads: 183
Joined: Nov 2010
Reputation:
35
If I use this with another model, will players still be not able to pass through it?
Posts: 916
Threads: 65
Joined: Jun 2011
(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?
Posts: 138
Threads: 6
Joined: Nov 2010
Reputation:
2
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?
Posts: 916
Threads: 65
Joined: Jun 2011
Just checked and thats the code Im using already (but a bit different)
Posts: 5,320
Threads: 300
Joined: Feb 2011
Reputation:
149
Solid() only works on specifical models, and not all models.
Is there some way we can calculate the needed collbox for the model?
Posts: 288
Threads: 24
Joined: Dec 2010
Reputation:
19
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.
Posts: 2,992
Threads: 55
Joined: Feb 2011
Reputation:
114
yes, it is perfect, i made door system by linking collisions to them
Posts: 719
Threads: 69
Joined: Nov 2010
Reputation:
76
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.
|