Page 2 of 2

Posted: Mon Oct 10, 2005 8:57 am
by ViPER
Yes, that method will work in roundbased and objective for that matter.

For TDM and FFA this will work too -

I did a test using Rindogs script - I replaced the dummy with an orb tik so i could see it work. the origins were placing the block at foot level - So i moved them all up 40 units - and now they effectivley block spawning.

here all but one of the spawns are blocked in mohdm6 and trigger removes the blocks when players are near.

call from above waittill prespawn

Code: Select all

disable_tdm_spawns:
thread spawn_block_trigger  ( 240 -136 -96 ) 
thread spawn_block_trigger  ( -408 -808 88 ) 
thread spawn_block_trigger  ( -420 -845 328 ) 
thread spawn_block_trigger  ( -632 -610 328 ) 
thread spawn_block_trigger  ( -400 792 -96 ) 
thread spawn_block_trigger  ( 418 807 -96 ) 
thread spawn_block_trigger  ( 244 984 88 ) 
thread spawn_block_trigger  ( 236 984 328 ) 
thread spawn_block_trigger  ( -432 911 328 ) 
thread spawn_block_trigger  ( -432 911 88 ) 
thread spawn_block_trigger  ( -408 991 568 ) 
thread spawn_block_trigger  ( -312 896 88 ) 
thread spawn_block_trigger  ( -312 896 568 ) 
thread spawn_block_trigger  ( -280 904 328 ) 
thread spawn_block_trigger  ( 248 944 568 ) 
thread spawn_block_trigger  ( -1152 -72 552 ) 
thread spawn_block_trigger  ( -964 -192 302 ) 
thread spawn_block_trigger  ( -484 -610 88 ) 


thread spawn_block_trigger  ( 240 -72 -96 ) 
thread spawn_block_trigger  ( -400 -720 88 ) 
thread spawn_block_trigger  ( -420 -773 328 ) 
thread spawn_block_trigger  ( -664 -586 328 ) 
thread spawn_block_trigger  ( -400 856 -96 ) 
thread spawn_block_trigger  ( 418 871 -96 ) 
thread spawn_block_trigger  ( 244 1008 88 ) 
thread spawn_block_trigger  ( 236 1008 328 ) 
thread spawn_block_trigger  ( -432 935 328 ) 
thread spawn_block_trigger  ( -432 935 88 ) 
thread spawn_block_trigger  ( -488 991 568 ) 
thread spawn_block_trigger  ( -312 960 88 ) 
thread spawn_block_trigger  ( -312 984 568 ) 
thread spawn_block_trigger  ( -280 968 328 ) 
thread spawn_block_trigger  ( 248 1040 568 ) 
thread spawn_block_trigger  ( -1152 8 552 ) 
thread spawn_block_trigger  ( -964 -168 302 ) 
thread spawn_block_trigger  ( -484 -530 88 ) 
thread spawn_block_trigger  ( -1136 784 552 ) 
thread spawn_block_trigger  ( -1136 848 552 ) 
thread spawn_block_trigger  ( -336 -556 -107 ) 
thread spawn_block_trigger  ( -336 -492 -107 ) 
thread spawn_block_trigger  ( -704 800 -107 ) 
thread spawn_block_trigger  ( -624 816 -107 ) 
thread spawn_block_trigger  ( 912 -48 -96 ) 
thread spawn_block_trigger  ( 848 -48 -96 ) 
thread spawn_block_trigger  ( 1072 608 354 ) 
thread spawn_block_trigger  ( 1008 608 354 ) 
thread spawn_block_trigger  ( -650 -614 88 ) 
thread spawn_block_trigger  ( -586 -614 88 ) 
thread spawn_block_trigger  ( -1136 785 300 ) 
thread spawn_block_trigger  ( -1136 849 300 ) 

end

// local.trig.dummy = spawn script_model
// local.trig.dummy model "static/corona_orange.tik"

spawn_block_trigger local.origin:
 local.trig = spawn trigger_multiple
 local.trig.origin = local.origin
 local.trig setsize ( -9 -9 -9 ) ( 9 9 9 )
 local.trig wait 0.1
 local.trig delay 0.0
 local.trig setthread spawn_block_trigger_thread
 local.trig.dummy = spawn "fx/dummy.tik"
 local.trig.dummy.origin = local.origin
 local.trig.dummy setsize ( -1 -1 -1 ) ( 1 1 1 )
 local.trig.dummy solid

end

spawn_block_trigger_thread:
local.player = parm.other
self.dummy notsolid
while (local.player istouching self)
{
// println test
 wait .1
}
wait 1
//println endtest
self.dummy solid
end

Posted: Mon Oct 10, 2005 12:17 pm
by GiffE1118
i got it to work a long time ago. i made a ground only stalingrad

ya just

Code: Select all

exec global/global_spawn.scr::spawn_block_trigger  ( ORIGIN OF SPAWN )
you could also use wait exec
i dont see y you couldnt get it to work it worked fine for me

of course you need to have ringdogs thing save back in its original scr (global/global_spawn.scr)

and raising the trigger up a little wont do much to make it better only if you have your spawn origin set wrong you will need to raise that up.

i dont really get why your steeling it out of his script and what your trying to do with it :?: considering it works fine if you do it right. :?

Posted: Mon Oct 10, 2005 4:33 pm
by ViPER
i pulled it out because it wasnt working for me. I was executing the global and I spawned everywhere. I had previously made it local and still spawned everywhere. wasnt till i raised the origins did it work for me. and the spawn origins are the same in the bsp no matter what u do.
maybe a moh version thing??

Posted: Mon Oct 10, 2005 9:40 pm
by GiffE1118
gotcha :wink: if you look inside the spawnspots pk3 their is a scr of all the spawnspots for each map. take the thread disable tdm and disaable ffa spawns and all the execs in their should work. ya then dont need to get the locations yourself

Posted: Tue Oct 11, 2005 2:11 am
by ViPER
ah, but that is where i got them and i compared them to bspview - all same. Like i said maybe its a version thing allows spawning near solid objects.

so i put them in spawn player center and it worked.

Thanks Rindog! great idea!

Posted: Tue Oct 11, 2005 2:53 am
by mefy
The idea of blocking spawns only at the beginning of the round I've implemented in FT and CTF. Rindog's mod was originally based off my old CTF code that blocked spawns in Stalingrad to keep enemy players from spawning near a team's base. For FT and RBM I block spawns on mohdm1, mohdm4, modhm6, and mohdm7 at the beginning of the round to keep players from opposite teams from spawning next to each other.

You should be spawning an invisible and solid object on the spawn you want to block, then just remove it or make it non-solid after X seconds into the round. The key is to keep the spawn blocks in an array so that you can access them later to remove them.

Posted: Tue Oct 11, 2005 5:30 am
by ViPER
Or just give them targetnames. Thread it after waittill spawn and add a wait period.

$all_spawn_blocks remove