Spawn solid object around models !?!

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Spawn solid object around models !?!

Post by mcunha98 »

Hi people,

Well is this not my area, but some friends call to help with a map, putting a solid into the objective of a map.

I search in net, but i found only spawn script to create models and triggers. In my case i need spawn a brush with locations highlights in screenshot, and texture it with metalclip.

Some idea ???

Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

texture

Post by tltrude »

You can't spawn a texture, as far as I know. You can spawn a script object for the invisible clip brush.
Tom Trude,

Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

Tom,

Thanks for reply.
If not is possible spawn a brush, so i need spawn a trigger with solid propertie. See in net, i found many examples, but i have little questions about this.
Based in screenshot i send, i write this peace of code. Is possible reply some question:

Code: Select all

local.subsolid1 = spawn trigger_multipleall 
local.subsolid1.origin = ( 2744 3224 0 )  //x -> y -> z
local.subsolid1 setsize ( -704 -2055 -100 ) ( 704 2055 500 ) // how define this ???
local.subsolid1 targetname subsolid1 //i think this is relacted with spawnflags, ok ? 
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

script object

Post by tltrude »

I does not need it to be a trigger. A script object is solid, but will have no texture--can't make it metal.

local.subsolid1 = spawn script_object

"setsize" sets the location of two corners of the box. The numbers are unit distance from the origin point ( 0 0 0 ) of the box.

The object does not need a trgetname, if it is not being moved or turned on and off.
Tom Trude,

Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

Maybe this:

Code: Select all

local.subsolid1 = spawn script_object 
local.subsolid1.origin = ( 2744 3224 0 )  //x -> y -> z 
local.subsolid1 setsize ( -704 -2055 -100 ) ( 704 2055 500 ) // how define this ??? 

Is possible have more references about the setsize operator ?
"setsize" sets the location of two corners of the box. The numbers are unit distance from the origin point ( 0 0 0 ) of the box.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Post by tltrude »

local.subsolid1 setsize ( -30 -40 -10 ) ( 40 30 60 ) // two 3d points in space (xyz)(xyz) define the size of the box from the zero origin point.

So for X, the edges of the box are 30 units to the left and 40 units to the right of the origin point.

And for Y, The edges are 40 unit to the front and 30 units to the back of the origin point.

For Z, the bottom is 10 units below the origin point, and the top is 60 units above the origin.


Now, can you figure out how big my example box is in units?
Tom Trude,

Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

Thanks,

I apply the code using your tips and work fine !
Thanks again !!! :lol:
Post Reply