Hey all,
I've again a very hard problem: I want to summon 3 care packages (on top of each other) instead of 1, that are linked to eachother. I have the code to summon 1 cps
Code:
SpawnCrate()
{
self endon("death");
self notifyonplayercommand("smoke", "+smoke");
self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" );
for(;;){
self waittill( "smoke" );
self waittill( "dpad_right" );
if(self.ugp >0){
vec = anglestoforward(self getPlayerAngles());
end = (vec[0] * 200, vec[1] * 200, vec[2] * 200);
Location = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self )[ "position" ];
crate = spawn("script_model", Location+(0,0,20));
crate CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
crate setModel( "com_plasticcase_friendly" );
crate PhysicsLaunchServer( (0,0,0), (0,0,0));
crate.angles = self.angles+(0,90,0);
crate.health = 300;
self thread crateManageHealth(crate);
self.ugp--;
}
}
}
Help me for free thanks :P