Page 1 of 1

scr_object outside the skybox

Posted: Fri Apr 13, 2007 11:17 pm
by ViPER
i want to hide about 100 script objects that are bound to 1. if i hide the 1 the rest are still visible - so would need to hide each individually.

instead I noticed i can move them outside the skybox to achieve this and even call them back later....

this seems sloppy though. any problems with this method ?

targetname

Posted: Sat Apr 14, 2007 12:25 am
by tltrude
Its hard to tell what you want this for, but it might be easier to just give all 101 objects the same targetname. Then you can hide/show them together.

for(local.i = 1; local.i <= $myobject.size; local.i++)
{
local.myobject = $myobject[local.i]
local.myobject hide
}

That might not be right. But, the idea is to assign all the objects (named myobject) an index number and then hide them all.

Posted: Sat Apr 14, 2007 8:34 am
by ViPER
its for a dynamic maze objective. each round builds a new randomly selected maze and custom mazes can be added via server side script.

each panel has to have a unique targetname for this. the bottom picture is the spare panels being thrown from the maze at build.

MAZEMADNESS.

Image


Image



Image

Image

Image

Image

Posted: Sat Apr 14, 2007 11:49 am
by jv_map
Haha awesome!! 8-)

I recommended hiding the objects you don't need, it requires much less network traffic than sending them all to some other place in the map.

vis_leafgroup

Posted: Sat Apr 14, 2007 4:54 pm
by tltrude
You could probably do it with vis_leafgroups too.

$vis1.target = $vis4::$vis7::$vis12::$vis43
$vis1.target = NIL
$vis1.target = $vis6::$vis8::$vis16::$vis74

Also not sure if that scripting will work.

Posted: Sat Apr 14, 2007 6:43 pm
by ViPER
hmmmm - If I hide them they are still solid ? I would like to keep each object to one line so it will be easiest to add more mazes.

I like vis -fast lol. maybe I could move them into a vis brush rather then outside the skybox. maze build seems to work fine but i have not tested it on the server with others.

But im not hearing any concerns about pushing these things outside the skybox?

Posted: Sat Apr 14, 2007 8:03 pm
by neillomax
Why don't you make 4 seperate arenas. The arena you are playing in is "vise'd" out from the other three. Use teleports to make people go to the next arena in a given amount of time.

you should be able to keep them all under one skybox without taking a big hit in performance.

You just need to make sidewalls using a wall texture and a sky texture wall on top of that for each arena. A common roof could be used for all.

Posted: Sun Apr 15, 2007 2:43 am
by lizardkid
He wants a completely dynamic arena, from what i gather neil.

well if you want to have a single list to apply a command to all of them, do like this.

Code: Select all

local.array = $thing1::$thing2::$thing3
local.array hide
local.array notsolid
same deal as giving them all the same targetname, except this way you can control where in the array they are.

move

Posted: Sun Apr 15, 2007 5:28 am
by tltrude
Its ok to move them outside the skybox, just don't move them outside the limits of the grid. You can also move them down under the terrain.

I like lizardkid's idea --don't have to move anything. If they are solid when hidden, just use:

Code: Select all

local.array = $thing1::$thing2::$thing3 
local.array notsolid
local.array hide
and

Code: Select all

 
local.array solid
local.array show

Posted: Sun Apr 15, 2007 6:19 am
by ViPER
yeah thanks guys - thats clean.