[SOLVED]How do you spawn explosive barrels ?

Posts 16 of 6 · Page 1 of 1
[SOLVED]How do you spawn explosive barrels ?
I found the following code but it doesnt seem to work for me :
Code:
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;
} 
entity = spawn( "script_model", (2977,-2936,282) );
        entity.angles = (0,53,0);
        entity setModel( "com_barrel_benzin" );
        entity.targetname = "explodable_barrel";
        entity.target = "pf77_auto1";//you need the target name to make it solid
        EntCollision = getEnt( entity.target, "pf77_auto1" );//also include this line
        entity CloneBrushmodelToScriptmodel( EntCollision );
        entity common_scripts\_destructible::setup_destructibles();
This seems to be set for spawning ob shooting, but somehow i cant get it working for spawned stuff... any advice ?
/Moved to help
It only works on maps that PreCache "com_barrel_benzin".
/Marked as solved.
how is this solved ? omg
Quote Originally Posted by kerocx View Post
how is this solved ? omg
Because you have been told why it wasn't working for you. It only works for certain maps.

So now you know what to do. Make sure ur using a map that works.
Posts 16 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?