Post: Spawning Solid Objects
12-17-2011, 12:44 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); hey guys,ive put together a script which spawns a solid model by co-ords, and its the smallest one ive seen in awhile, i did some research for other varibles and entities and came across this,i tested it to see what it did and it spawned a non- laggy barrier inside the object,the down side of this script is that its only a small barrier but i think you can adjust it by the value 2 or more, so enjoy.

    
RandomObject = spawn( "script_model", (0,0,0) ); // place your object co-ords in here
RandomObject setmodel("model here"); //model name goes in here, must be precached!
RandomObject setContents(1); //makes a small barrier inside the object, no lag at all!


preview

You must login or register to view this content.
(adsbygoogle = window.adsbygoogle || []).push({});

The following user thanked Uk_ViiPeR for this useful post:

Taylor
12-17-2011, 01:16 PM #2
IVI40A3Fusionz
Former Gaming Squad Member
So if i use this no matter how big the model no-one will be able to go through it?
12-17-2011, 01:25 PM #3
Originally posted by UK
hey guys,ive put together a script which spawns a solid model by co-ords, and its the smallest one ive seen in awhile, i did some research for other varibles and entities and came across this,i tested it to see what it did and it spawned a non- laggy barrier inside the object,the down side of this script is that its only a small barrier but i think you can adjust it by the value 2 or more, so enjoy.

    
RandomObject = spawn( "script_model", (0,0,0) ); // place your object co-ords in here
RandomObject setmodel("model here"); //model name goes in here, must be precached!
RandomObject setContents(1); //makes a small barrier inside the object, no lag at all!


setContents is already used quite a lot isn't it?... And I thought the (1) was true and (0) was false ? Have you tried with a (2) ?
12-17-2011, 01:28 PM #4
Originally posted by x. View Post
setContents is already used quite a lot isn't it?... And I thought the (1) was true and (0) was false ? Have you tried with a (2) ?
ye,i think its only tru and false,but when you use in ingame and the object is placed on the floor it doesnt become solid for some reason, it need to be up abit from the ground in order to form a barrier. and i havnt seen anyone use setContents on here before.
12-17-2011, 01:33 PM #5
Originally posted by UK
ye,i think its only tru and false,but when you use in ingame and the object is placed on the floor it doesnt become solid for some reason, it need to be up abit from the ground in order to form a barrier. and i havnt seen anyone use setContents on here before.


It was used in MW2 a lot then.. there is also a solid() and MakeSolid() function you can use..

The following user thanked x_DaftVader_x for this useful post:

Correy
12-17-2011, 01:34 PM #6
Originally posted by x. View Post
It was used in MW2 a lot then.. there is also a solid() and MakeSolid() function you can use..
ye,tried them in cod4, the dont work at all :p
12-17-2011, 01:35 PM #7
Originally posted by UK
ye,tried them in cod4, the dont work at all :p


Haha, not much does work in cod4 does it . :(
12-17-2011, 02:37 PM #8
Originally posted by UK
hey guys,ive put together a script which spawns a solid model by co-ords, and its the smallest one ive seen in awhile, i did some research for other varibles and entities and came across this,i tested it to see what it did and it spawned a non- laggy barrier inside the object,the down side of this script is that its only a small barrier but i think you can adjust it by the value 2 or more, so enjoy.

    
RandomObject = spawn( "script_model", (0,0,0) ); // place your object co-ords in here
RandomObject setmodel("model here"); //model name goes in here, must be precached!
RandomObject setContents(1); //makes a small barrier inside the object, no lag at all!
All this dose is set the contents of an entity. Returns the old contents. it dose not make it solid a player can still walk in it Happy
12-17-2011, 02:40 PM #9
Originally posted by IELIITEMODZX View Post
All this dose is set the contents of an entity. Returns the old contents. it dose not make it solid a player can still walk in it Happy
it made the random box solid when i put it in the air, i kept on sliding off it lol.
12-17-2011, 02:43 PM #10
Originally posted by UK
it made the random box solid when i put it in the air, i kept on sliding off it lol.
ive only ever tryed this on waw ill give it ago on cod4 now Happy

edit: just tryed it and it spawns a little sphere lawl

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo