Post: [CODE] How to Spawn + Move Care Packages for building
07-21-2010, 06:48 PM #1
DEREKTROTTER
You're Goddamn Right
(adsbygoogle = window.adsbygoogle || []).push({}); How to Spawn + Move Care Packages for building

Now you can build your own Care Package bunker like TheUnkn0wn Smile

[ame]https://www.youtube.com/watch?v=fYEEsvZEnJw[/ame]
^ Bunker created by TheUnkn0wn

Pre-Made .GSC file
You must login or register to view this content.

not my code

Credit goes to Deadly


    
self thread PickupCrate();
self thread SpawnCrate();
self thread _SpawnTurret();


_SpawnTurret()
{
self notifyonplayercommand("3", "+actionslot 3");
for(;
{
self waittill("3");
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" ];
turret = spawnTurret( "misc_turret", Location, "pavelow_minigun_mp" );
turret.angles = self.angles;
turret setModel( "weapon_minigun" );
self.ugp--;
}
}
}

SpawnCrate()
{
self endon("death");
self notifyonplayercommand("N", "+actionslot 1");
for(;
{
self waittill("N");
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 = 250;
self thread crateManageHealth(crate);
self.ugp--;
}
}
}

crateManageHealth(crate)
{
for(;
{
crate setcandamage(true);
crate.team = self.team;
crate.owner = self.owner;
crate.pers["team"] = self.team;
if(crate.health < 0)
{
level.chopper_fx["smoke"]["trail"] = loadfx ("fire/fire_smoke_trail_L");
playfx(level.chopper_fx["smoke"]["trail"], crate.origin);
crate delete();
}
wait 0.1;
}
}

PickupCrate()
{
self endon("death");
self notifyonplayercommand("5", "+actionslot 2");
self waittill("5");
vec = anglestoforward(self getPlayerAngles());
end = (vec[0] * 100, vec[1] * 100, vec[2] * 100);
entity = BulletTrace( self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 100, vec[1] * 100, vec[2] * 100), 0, self )[ "entity" ];
if(entity.model != "com_plasticcase_enemy" && isdefined(entity.model))
{
self thread DropCrate();
for(;
{
self endon("5");
entity.angles = self.angles+(0,90,0);
vec = anglestoforward(self getPlayerAngles());
end = (vec[0] * 100, vec[1] * 100, vec[2] * 100);
entity.origin = (self gettagorigin("tag_eye")+end);
self.moveSpeedScaler = 0.5;
self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
wait 0.05;
}
}
else self thread PickupCrate();
}

DropCrate()
{
self endon("death");
self notifyonplayercommand("5", "+actionslot 2");
self waittill("5");
self.moveSpeedScaler = 1;
self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
self thread PickupCrate();
}

GetCursorEntity()
{
forward = self getTagOrigin("tag_eye");
vec = anglestoforward(self getPlayerAngles());
end = (vec[0] * 20000, vec[1] * 20000, vec[2] * 20000);
entity = BulletTrace( forward, end, 0, self )[ "entity" ];
return entity;
}



Here is Theunkn0wn's Care Package Bunker in .GSC ready for PC

You must login or register to view this content.


Useful Downloads
You must login or register to view this content. (7.93 GB)

You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.

:pedo:
(adsbygoogle = window.adsbygoogle || []).push({});

The following 23 users say thank you to DEREKTROTTER for this useful post:

-Luis7uarez-, Alfa, AtlasK, Bluffed, DanGFX, DEVILEE97G-UNIT, FireWire, FourzerotwoFAILS, fremzes, hatashi, jml, kane212, LOL CAT, Macdaddy4sure, miah788, oI xPozeD Io, Swifter, Tha_Cartel, TheMagicPancake, Uk_ViiPeR, Weescotty, XeDa, zIFazex
07-23-2010, 01:43 AM #38
Octavia
"PonyF ag"
Makes me wish I had a JTAG.


~Elmo
07-23-2010, 07:57 AM #39
DEREKTROTTER
You're Goddamn Right
Originally posted by Weescotty View Post
i did it derrik thnks for the help earlier in the thread Smile just need to know how can i make two mods work to gather using mod loader ??


you can do that by copying .gsc code from one to the other

cnt load 2 at once though
07-23-2010, 09:41 AM #40
how do you spawn an Emergency Airdrop Plane like you do with carepackages? I've looked for the code everywhere everywhere but can't seem to find it :S any help would be appreciated thx Smile

Ow yeah..SUPERAWESOME HACK THANKS YOU MAN!! REP
07-23-2010, 10:19 AM #41
DEREKTROTTER
You're Goddamn Right
Originally posted by hatashi View Post
how do you spawn an Emergency Airdrop Plane like you do with carepackages? I've looked for the code everywhere everywhere but can't seem to find it :S any help would be appreciated thx Smile

Ow yeah..SUPERAWESOME HACK THANKS YOU MAN!! REP


its the ac-130 model

but be warned, they are MASSIVE at ground level :evil:
07-23-2010, 11:13 AM #42
BOOMSHAKALAKA
KILLERS DON'T DIE SO EASY
Originally posted by Derek
no, i think he does it differently

he lined the crates up perfectly, like fitting together a puzzle


He doesn't build that everytime he wants one, he can just make one spawn ready made with all the weapons inside etc.
07-23-2010, 11:16 AM #43
Originally posted by Derek

credit goes to lost4468 i believe


Im the uploader of the video you see embedded on this site.
The credits DONT go to lost. They go to deadly.

He made the blacky the builder mod. The mod was my idea and he made the code.

Greetz Black
07-23-2010, 11:26 AM #44
S10
TROLLN 1337
Man i wish my laptop wasnt fried!! :(
07-23-2010, 11:56 AM #45
Originally posted by Derek
you can do that by copying .gsc code from one to the other

cnt load 2 at once though


i get an error whn i copy 2 in to 1 when i try to start a game , anyway im rendering my vid now ill post it here soon i gave you all credit, againg thanks for the help
07-23-2010, 05:13 PM #46
DanGFX
Dan's GFX Shop v 2.0 check it out!
i builded a castle in the sky on rust xD rendering the video atm Happy i will post link soon

The following user thanked DanGFX for this useful post:

DEREKTROTTER

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo