Page 1 of 1

Changing Stock Spawns in respawn(Omaha)

Posted: Sat Jul 17, 2004 12:59 pm
by Splaetos
The main logic in this code is taken from Bjarne's hunt mod... (I'm not good at mapmod type scripting so im a bit hazy on some of it)

Would this work to change the spawns in omaha when there are 3 minutes remaning in the round? -the spawns arent inserted yet of course, and the de-activation thread was removed, because I want the spawns to stay live... so I added a never ending while loop...

Code: Select all

     level.endgame = 180
     level.round_time = (int(getcvar "roundlimit"))
     println "roundlimit = " level.round_time
     level.time_remaining = (level.round_time * 60)
     println "roundlimit(seconds) = " level.time_remaining

     waitTill roundstart

     thread endgame_spawns

endgame_spawns:

     if level.time_remaining > level.endgame
     {
          level.time_remaining = (level.time_remaining - 10)
          wait 10
          goto engame_spawns
     }
     else
     {
          thread move_spawn_to_point //(3888 1744 -312) (3562 516 -194)
	     thread move_spawn_to_point //(3840 1216 -306) (5479 -173 -333)
	     thread move_spawn_to_point //(3072 1408 -306) (3715 -67 -450)
	     thread move_spawn_to_point //(3680 1888 -274) (4257 -571 -382)
          iprintlnbold_noloc "The Allies are mounting a Final Charge!"
     }

end

move_spawn_to_point local.from local.to:
	
     local.size_modifier = (32 32 96)
	local.tele_trigger = spawn trigger_multiple "targetname" "teleporter"
	local.tele_trigger setsize ( local.from - local.size_modifier ) ( local.from + local.size_modifier )
	println "Spawn moved from " local.from " to " local.to

	//thread deactivation_handler local.tele_trigger
	while (1)
     {
          local.tele_trigger waittill trigger
	     parm.other.origin = local.to
	     println "Player moved from " local.from " to " local.to
     }

end

Posted: Sat Jul 17, 2004 3:48 pm
by tltrude
There needs to be an end line here.

=======================

waitTill roundstart

thread endgame_spawns

end

endgame_spawns:

=======================

Posted: Sat Jul 17, 2004 4:40 pm
by strafer
Just make sure that you create new origins for the spots that you want them to spawn at. (If you haven't done that already). 8-)

Posted: Sat Jul 17, 2004 5:13 pm
by Splaetos
those were jsut code snippets to add to omaha... so no ends or main or etc etc

and yea, i will set up the spawns... i just wanted to make sure my loop looked logical...

I wont get a chance to actually set it up and see if it works till im done compiling heh

Posted: Sun Jul 18, 2004 4:38 am
by Bjarne BZR
I'm really tired right now, but that code looks fucked up... mail it to me in its entirety. And Il try to sort it out.