Page 1 of 2
Can't make Solid
Posted: Sat Mar 05, 2005 8:08 pm
by LiquorKraZy
ok...i've spawned some trees into some of the maps using the following code which works perfect....the only problem is that the trees arent solid...so if i add $xtra# solid to the script it makes it solid but you cant even walk within like 10 ft of the tree....
xtras:
spawn static/tree_oak "targetname" "xtra7"
$xtra7.origin = ( -2985.37 4070.72 -447.88)
$xtra7.angles = (0 30.84 0)
spawn static/tree_commontree "targetname" "xtra8"
$xtra8.origin = ( -696.66 4558.11 -447.88)
$xtra8.angles = (0 115.05 0)
$xtra8.scale = 1.50
spawn static/tree_commontree "targetname" "xtra9"
$xtra9.origin = ( -2077.90 1889.62 -447.88 )
$xtra9.angles = (0 30.84 0)
$xtra9.scale = 2
so i tried to spawn a script_object using
local.block = spawn script_object
local.block.origin = ( 0 0 0 )
local.block setsize ( -50 -50 0 ) ( 50 50 100 )
but that doesnt work at all...any ideas on what to do to make the trees so that people cant walk thru them or shoot through them....???
Posted: Sat Mar 05, 2005 8:33 pm
by Rookie One.pl
Make the script_object smaller (just to cover the root of the tree) and solid and immune to damage, eg.:
Code: Select all
local.block = spawn script_object origin $xtra7.origin
local.block setsize ( -12 -12 -16 ) ( 12 12 100 )
local.block solid
local.block nodamage
local.block immune bullet
local.block immune fast_bullet
local.block immune rocket
local.block immune explosion
local.block immune grenade
local.block immune shotgun
local.block immune bash
local.block immune crush
local.block immune falling
local.block immune vehicle
That will make the root of the oak solid and not let bullets and projectiles, whatever through. It sets the size to 24x24x116 (24 is 3/4 of a player's width) - this -16 is just in case.
Petey wrote:if i add $xtra# solid to the script it makes it solid but you cant even walk within like 10 ft of the tree....
That's because executing the solid command on a spawned object uses its bounding box as the collision entity. It appears that the box in this case is like 20 by 20 feet.

Posted: Sat Mar 05, 2005 8:34 pm
by Master-Of-Fungus-Foo-D
Solid makes the bounding box solid (if anyone can tell me otherwise im open)... you could spawn a clip... if you know how...
you beat me to my crappy advice rookie
Posted: Sat Mar 05, 2005 9:02 pm
by LiquorKraZy
ok..i included the script file for Remagen....i tried to paste that code you gave me ROOKIE but it doesnt seem to work...if anyone could, please take a look at the scripting and tell me what im doing wrong...
// REMAGEN
// ARCHITECTURE: WOLF
// SCRIPTING: WOLF
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Remagen"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" "The 101st Screamin'"
setcvar "g_obj_axistext1" "Eagles"
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" "www.101stairborneclan.com"
setcvar "g_scoreboardpic" "mohdm3"
// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/dm/mohdm3.scr
exec global/ambient.scr mohdm3
thread global/door_locked.scr::lock
level waittill spawn
$world farclipoverride -1
thread block
thread xtras
thread truck
end
//-----------------------------------------------------------------------------
xtras: spawn static/tree_commontree "targetname" "xtra11"
$xtra11.origin = ( 1340.37 197.46 -63.88 )
$xtra11.angles = ( 0 -83.51 0 )
$xtra11.scale = 1.75
spawn static/tree_commontree "targetname" "xtra10"
$xtra10.origin = ( 621.13 -1388.71 8.13 )
$xtra10.angles = ( 0 -83.51 0 )
$xtra10.scale = 2
spawn static/tree_commontree "targetname" "xtra9"
$xtra9.origin = ( 4409.73 -3591.01 8.13 )
$xtra9.angles = ( 0 -83.51 0 )
$xtra9.scale = 1.25
spawn static/tree_commontree "targetname" "xtra12"
$xtra12.origin = ( 461.57 -42.81 -48.70 )
$xtra12.angles = ( 0 -83.51 0 )
$xtra12.scale = 1.50
spawn static/tree_commontree "targetname" "xtra15"
$xtra15.origin = ( 2552.09 -2789.01 8.13 )
$xtra15.angles = ( 0 -34.85 0 )
$xtra15.scale = 1.25
end
//-----------------------------------------------------------------------------
truck: local.truck = spawn script_model
local.truck model "static/vehicle_dtruck_burnt.tik"
local.truck.origin = ( 3624.18 -3766.56 1.60 )
local.truck.angles = ( 0 144.40 0 )
local.truck solid
end
//-----------------------------------------------------------------------------
block: local.block = spawn script_object origin $xtra9.origin
local.block setsize ( -12 -12 -16 ) ( 12 12 100 )
local.block solid
local.block nodamage
local.block immune bullet
local.block immune fast_bullet
local.block immune rocket
local.block immune explosion
local.block immune grenade
local.block immune shotgun
local.block immune bash
local.block immune crush
local.block immune falling
local.block immune vehicle
end
//-----------------------------------------------------------------------------
roundbasedthread:
// Can specify different scoreboard messages for round based games here.
level waitTill prespawn
level waittill spawn
// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw
level waittill roundstart
end
Posted: Sat Mar 05, 2005 9:22 pm
by Rookie One.pl
Try this:
Code: Select all
// REMAGEN
// ARCHITECTURE: WOLF
// SCRIPTING: WOLF
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Remagen"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" "The 101st Screamin'"
setcvar "g_obj_axistext1" "Eagles"
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" "www.101stairborneclan.com"
setcvar "g_scoreboardpic" "mohdm3"
// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/dm/mohdm3.scr
exec global/ambient.scr mohdm3
thread global/door_locked.scr::lock
level waittill spawn
$world farclipoverride -1
thread block
thread xtras
thread truck
end
//-----------------------------------------------------------------------------
xtras:
spawn static/tree_commontree "targetname" "xtra11"
$xtra11.origin = ( 1340.37 197.46 -63.88 )
$xtra11.angles = ( 0 -83.51 0 )
$xtra11.scale = 1.75
thread block $xtra11.origin
spawn static/tree_commontree "targetname" "xtra10"
$xtra10.origin = ( 621.13 -1388.71 8.13 )
$xtra10.angles = ( 0 -83.51 0 )
$xtra10.scale = 2
thread block $xtra10.origin
spawn static/tree_commontree "targetname" "xtra9"
$xtra9.origin = ( 4409.73 -3591.01 8.13 )
$xtra9.angles = ( 0 -83.51 0 )
$xtra9.scale = 1.25
thread block $xtra9.origin
spawn static/tree_commontree "targetname" "xtra12"
$xtra12.origin = ( 461.57 -42.81 -48.70 )
$xtra12.angles = ( 0 -83.51 0 )
$xtra12.scale = 1.50
thread block $xtra12.origin
spawn static/tree_commontree "targetname" "xtra15"
$xtra15.origin = ( 2552.09 -2789.01 8.13 )
$xtra15.angles = ( 0 -34.85 0 )
$xtra15.scale = 1.25
thread block $xtra15.origin
end
//-----------------------------------------------------------------------------
truck: local.truck = spawn script_model
local.truck model "static/vehicle_dtruck_burnt.tik"
local.truck.origin = ( 3624.18 -3766.56 1.60 )
local.truck.angles = ( 0 144.40 0 )
local.truck solid
end
//-----------------------------------------------------------------------------
block local.org:
local.block = spawn script_object origin local.org
local.block setsize ( -12 -12 -16 ) ( 12 12 100 )
local.block solid
local.block nodamage
local.block immune bullet
local.block immune fast_bullet
local.block immune rocket
local.block immune explosion
local.block immune grenade
local.block immune shotgun
local.block immune bash
local.block immune crush
local.block immune falling
local.block immune vehicle
end
//-----------------------------------------------------------------------------
roundbasedthread:
// Can specify different scoreboard messages for round based games here.
level waitTill prespawn
level waittill spawn
// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw
level waittill roundstart
end
Posted: Sat Mar 05, 2005 10:45 pm
by LiquorKraZy
Posted: Sun Mar 06, 2005 10:33 am
by Rookie One.pl
No problem, glad to help.

Posted: Sun Mar 06, 2005 11:50 am
by Grassy
Rookie One wrote:
local.block = spawn script_object origin $xtra7.origin
local.block setsize ( -12 -12 -16 ) ( 12 12 100 )
local.block solid
local.block nodamage
local.block immune bullet
local.block immune fast_bullet
local.block immune rocket
local.block immune explosion
local.block immune grenade
local.block immune shotgun
local.block immune bash
local.block immune crush
local.block immune falling
local.block immune vehicle
Wouldn't "nodamage" on it's own elimenate the need for all the immune lines below it.

Grassy
Posted: Tue Mar 08, 2005 8:59 pm
by Rookie One.pl
No, Grassy, as the immune command makes the script_object clip bullets and everything (I know it's illogical, but that's the way it is) - if you just use nodamage, you can still shoot through it.
Posted: Wed Mar 09, 2005 9:26 am
by Grassy
Ah ok, thanks for the explanation, pitty they didn't just add one more option, "immune All"
Grassy
Posted: Thu Mar 17, 2005 4:28 am
by LiquorKraZy
ok...i tried using the BLOCK thread posted above in the omaha map..i guess it doesnt work when the map is obj but this is the error i get which is shown in the screenshot below:
this is what part of my script looks like:
level waittill spawn
thread xtras
thread block
end
//-----------------------------------------------------------------------------
xtras:
spawn static/tree_commontree "targetname" "xtra11"
$xtra11.origin = ( 1340.37 197.46 -63.88 )
$xtra11.angles = ( 0 -83.51 0 )
$xtra11.scale = 1.75
thread block $xtra11.origin
end
//------------------------------------------------------------------------------
block local.org:
local.block = spawn script_object origin $xtra7.origin
local.block setsize ( -12 -12 -16 ) ( 12 12 100 )
local.block solid
local.block nodamage
local.block immune bullet
local.block immune fast_bullet
local.block immune rocket
local.block immune explosion
local.block immune grenade
local.block immune shotgun
local.block immune bash
local.block immune crush
local.block immune falling
local.block immune vehicle
end
Posted: Thu Mar 17, 2005 6:23 am
by Grassy
//-----------------------------------------------------------------------------
level waittill spawn
thread xtras
// thread block **dont need this line your xtras thread calls it**
//but the whole script was falling over before this when trying to spawn the tree the wrong way
xtras:
spawn static/tree_commontree "targetname" "xtra11"
$xtra11.origin = ( 1340.37 197.46 -63.88 )
$xtra11.angles = ( 0 -83.51 0 )
$xtra11.scale = 1.75
thread block $xtra11.origin
here is the problem, notice the error in your console with a ^ pointing to spawn? you have to define what model it is first, and you forgot the .tik. It should look like this.
local.tree = script_model "model" "static/tree_commontree.tik" "targetname" "xtra11"
Grassy
Posted: Thu Mar 17, 2005 7:28 am
by LiquorKraZy
ill try that...but whats weird is that the xtras thread and the block thread worked fine on all the other maps i scripted like:
xtras:
spawn static/tree_commontree "targetname" "xtra11"
$xtra11.origin = ( 1340.37 197.46 -63.88 )
$xtra11.angles = ( 0 -83.51 0 )
$xtra11.scale = 1.75
thread block $xtra11.origin
but then i put them in OMAHA Beach and the trees spawn just fine...only the BLOCK thread that ROOKIE gave me suddenly wont work...kinda weird!
Posted: Thu Mar 17, 2005 10:57 am
by Grassy
Doh I just re read your script again, still problems there.
//-----------------------------------------------------------------------------
xtras:
spawn static/tree_commontree "targetname" "xtra11"
$xtra11.origin = ( 1340.37 197.46 -63.88 )
$xtra11.angles = ( 0 -83.51 0 )
$xtra11.scale = 1.75
//thread block $xtra11.origin
<<--dont add .origin just the targetname
thread block $xtra11
end
//------------------------------------------------------------------------------
block local.org:
//local.block = spawn script_object origin $xtra7.origin
<<--?? where did this name come from?
local.block = spawn script_object "origin" local.org.origin
local.block setsize ( -12 -12 -16 ) ( 12 12 100 )
local.block solid
etc etc
So now the code should look like:
Code: Select all
//--------------------
xtras:
//--------------------
local.tree = script_model "model" "static/tree_commontree.tik" "targetname" "xtra11"
$xtra11.origin = ( 1340.37 197.46 -63.88 )
$xtra11.angles = ( 0 -83.51 0 )
$xtra11.scale = 1.75
thread block $xtra11
end
//-----------------------
block local.org:
//-----------------------
local.block = spawn script_object "origin" local.org.origin
local.block setsize ( -12 -12 -16 ) ( 12 12 100 )
local.block solid
local.block nodamage
local.block immune bullet
local.block immune fast_bullet
local.block immune rocket
local.block immune explosion
local.block immune grenade
local.block immune shotgun
local.block immune bash
local.block immune crush
local.block immune falling
local.block immune vehicle
end
Posted: Thu Mar 17, 2005 11:43 am
by ViPER
Hey Petey, use this one.
// oak tree
local.static = spawn script_model
local.static model "static/tree_oak.tik"
local.static.origin = ( -1234 657 99 )
local.static.angles = ( 0 0 0 )
local.static setsize "-16 -16 0" "16 16 180"
local.static solid