Changing Stock Spawns in respawn(Omaha)

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Splaetos
Major General
Posts: 730
Joined: Tue Jan 20, 2004 2:55 pm
Contact:

Changing Stock Spawns in respawn(Omaha)

Post 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
When I am king, you will be first against the wall~
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Post by tltrude »

There needs to be an end line here.

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

waitTill roundstart

thread endgame_spawns

end

endgame_spawns:

=======================
Tom Trude,

Image
strafer
Captain
Posts: 237
Joined: Sat Jan 31, 2004 11:29 pm
Location: The Motherland..
Contact:

Post 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-)
Splaetos
Major General
Posts: 730
Joined: Tue Jan 20, 2004 2:55 pm
Contact:

Post 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
When I am king, you will be first against the wall~
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post 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.
Admin .MAP Forums
Image
Head above heels.
Post Reply