force spectate

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

force spectate

Post by ViPER »

How do you force dead players to spectate from map script?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

3D

Post by tltrude »

Not sure you can, but you can force everyone into 3D mode.

setcvar cg_3rd_person 1

0 - turns it back off. You can also force them all to watch from a camera location.

Code: Select all

missle_explode:

	level.missle_destroyed = 1
	$watch_camera fov 70 2
	setcvar cg_3rd_person 1
	$watch_camera watch "$missle_burn" 0
	if (level.missle_gone == 0)
	{
		$watch_camera watch "$silo_origin" 0
	}
	$watch_camera cut
	cuecamera $watch_camera

	local.fire3 = spawn script_model 
	local.fire3 model models/emitters/missile_explosion.tik // was  fx/fx_flak88_explosion.tik 
 	local.fire3.origin = $missle.origin + (0 0 0)
 	local.fire3.scale = 3
	local.fire3 anim start

	if (level.missle_gone == 1)  // Skips these if missile is in silo.
	{
			//wait .4
		$mexplode2 anim start
		wait .4
		$mexplode1 anim start
	}

	$missle stoploopsound
	$mexplode1 playsound v4_explode_snd
	wait .2
	exec global/earthquake.scr 3 .5 0 0

	$missle_fire unbind $missle
	$missle_fire.scale = 5
	$missle_fire anim start

	$missle2 show
	$missle2 unbind $missle
	$missle remove
	$missle_fire bind $missle2
	$missle_burn moveto $missle2
	$missle_burn move

	$engine_1 anim stop
	$engine_2 anim stop
	$rocket_steam1 anim stop
	$rocket_steam2 anim stop
	$ventfire1 anim stop
	$ventfire2 anim stop
	$mexplode2 anim stop
	$engine_lite remove

	$missle_burn anim start

	$missle2 notsolid          // Falling missile
	$missle2 speed 150
	$missle2 time 6 // was 8
	$missle2 moveto $silo_origin

	if (level.missle_gone == 1)  // Skips these if missile is in silo.
	{
	$missle2 rotateY 30
	$missle2 rotateZup 95
	}

	$missle2 waitmove
	$silo_clip remove

	$missle_burn remove
	local.fire7 = spawn script_model 
	local.fire7 model models/emitters/missile_explosion.tik 
 	local.fire7.origin = $missle2.origin
 	local.fire7.scale = 3
	local.fire7 anim start

	$silodoor_left remove
	$silodoor_right remove
	exec global/exploder.scr::explode 1
	thread kill_gawkers
	$v4_startup_speaker playsound v4_explode_snd
	exec global/earthquake.scr 3 .5 0 0
	thread pusher
	$missle2 hide

	wait 10
	$missle_fire anim stop
	teamwin allies
	wait 3
	setcvar cg_3rd_person 0

end
Tom Trude,

Image
PKM
General
Posts: 1888
Joined: Tue Aug 09, 2005 4:43 pm
Location: Philadelpia but stuck in San Antonio TX (hell)

Post by PKM »

hey tl, uh what does that above script do in layman's terms ? 'cause i dunno but with the word's missle in it, gotta say like it'd look damn cool.
i'm not f****** angry, i'm from philadelphia .
Image
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

Thanks Tom,

looks like it forces everyone to view an event from a camera angle. What i'm trying to do, is as players die I want to force them to spectate down to the last.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

spawn

Post by tltrude »

Hmmm, have you tried removing all the spawn spots after the last player joins the game? Come to think of it, isn't there a game type setting that makes everyone wait in spectate until the last guy on one team is killed?

That thread is from the map "Gotterdammerung". A brillent conversion of a StarWars Jedi Outcast map called "Kejim". It has been transformed into a Nazi ICBM base! This isn't your typical "V2 Facility" map because the Allied Players can shoot the missile down as it takes off. Axis Players must try to keep the silo doors closed, and prevent the allied players from stopping the countdown, or destroying their final hope for victory!
Tom Trude,

Image
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

not in FFA -
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Viper, check out Mefy's freeze tag scripts.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
PKM
General
Posts: 1888
Joined: Tue Aug 09, 2005 4:43 pm
Location: Philadelpia but stuck in San Antonio TX (hell)

Re: spawn

Post by PKM »

tltrude wrote:
That thread is from the map "Gotterdammerung". A brillent conversion of a StarWars Jedi Outcast map called "Kejim". It has been transformed into a Nazi ICBM base! This isn't your typical "V2 Facility" map because the Allied Players can shoot the missile down as it takes off. Axis Players must try to keep the silo doors closed, and prevent the allied players from stopping the countdown, or destroying their final hope for victory!
thanks tl, i thought the code was some kind of ''sound effect/view effect'' initiated when a player is foreced into spectate.
i'm not f****** angry, i'm from philadelphia .
Image
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

Thanks Rookie, I will.
Post Reply