would someoen plz teach me how to script for my level


(Lock Ness Monster) #101

also everyone i got some good news, ive figured out how to also creat a dynamitable objective and stuff, but im wondeirng, what all do u got to put in a script to make it where u blwo something up and it ends the level, in the Death section of the object i want to be blown up in my script, i got the check game_manager to see who wins thing, but when i blow it up, everything is normal, it just doesnt want to end.


(nUllSkillZ) #102

An example:


game_manager
{
	spawn
	{
		accum 1 set 0

		// Game rules
		wm_axis_respawntime	15
		wm_allied_respawntime	15
		wm_set_round_timelimit	5

		wm_number_of_objectives 1

		// Objectives
		// 1: Primary: Destroy the wall

		// No. of Primary objectives
		wm_set_main_objective 1 0
		wm_set_main_objective 1 1

		// wm_objective_status <objective> <team> <status (0=neutral 1=complete 2=failed)
		wm_objective_status 1 0 0
		wm_objective_status 1 1 0
		
		// Stopwatch Modedefending team
		wm_set_defending_team 0

		wm_setwinner 0

		wait 2000
		
	}

	trigger checkgame
	{
		accum 1 inc 1
		accum 1 abort_if_not_equal 1
		
		wm_setwinner 1
		wm_endround
	}
}

//Targetname: Wall
//Scriptname: scrWall
//Construction Class: func_explosive
scrWall
{
	spawn
	{
		wait 200
		//classes: 1 (explosives), 2 (satchel), 3 (dynamite)
		constructible_class 3
	}

	death
	{
		wm_announce "Allies have blown the wall!"
		setstate Wall invisible
		wm_objective_status 1 0 2
		wm_objective_status 1 1 1

		trigger game_manager checkgame
	}
}


(Lock Ness Monster) #103

ok, i have 2 objs in my map, to blow a door up and to blow a computer up, what all would i have to change for that to work


(Ifurita) #104

Each obj would call this script


   trigger checkgame 
   { 
      accum 1 inc 1 
      accum 1 abort_if_not_equal 2 
       
      wm_setwinner 1 
      wm_endround 
   } 

With the final variable in this line, change to 2


    accum 1 abort_if_not_equal 2

Completion of each obj will increment accum 1 by 1 until you get to two (e.g., both obj completed) at which time the game will declare a winner


(Lock Ness Monster) #105

never mind about it, it works just fine, does anyone know of a good video tutorial on making moving things, those thigns really helped me


(_Muzzle_) #106

it’s not a video tutorial but this link really helped me on script_movers
http://www.nibsworld.com/rtcw/tutorial_basic_script_mover.shtml


(Lock Ness Monster) #107

i used that to, but the script part of it got me confused, see in that video it should u ever key that every major part had and every little detail in the script, if i could see one that was already made and there was a map with it that i could open in Radiant and see the keys, that would really help, ill try this again now that i have gained more knowlegde, but if anyone can find a good ex map and script for this stuff, plz let me know


(_Muzzle_) #108

Did u try the “map in a box” map yet?? It’s very helpfull i think


(Lock Ness Monster) #109

the what, i dont think ive seen it, what all does it cover?


(_Muzzle_) #110

it’s a small map with a forward spawn point, command posts, destructable walls, retrievable objects… http://www.planetwolfenstein.com/4newbies/mapping.htm

look under prefabs


(Lock Ness Monster) #111

this might help me a lot, thanks


(Lock Ness Monster) #112

i tried to download it, but when i try to extract its files to the right folder, it says it does it, but it doesnt, im confused now. even more the ususally cause my winzip has been working good so far


(_Muzzle_) #113

hmmm, weird :disgust: . Try a different folder and then move it manually


(Lock Ness Monster) #114

i did, it wont extract anywhere, i even tried my desktop


(_Muzzle_) #115

maybe infurita can help ya, cause it’s his prefab anyways :smiley:


(Lock Ness Monster) #116

lol, yeah, hey Ifurita, where r ya, i need some help lol


(Lock Ness Monster) #117

hey all, im gonna try to put some screen shots in of my test map, how do i do that, maybe if i show yall someoen can find out y it doesnt want to move


(_Muzzle_) #118

if you upload the images to www.imageshack.us you get a link, then just place them here


(Lock Ness Monster) #119

------the top of the elevator

------the bottem of the elevator

and here is the script, if u want to see what i labeled the heys go here

http://www.nibsworld.com/rtcw/tutorial_basic_script_mover.shtml

ok, now the script

 [/game_manager
{
	spawn
	{
		accum 1 set 0

		wm_axis_respawntime 20
		wm_allied_respawntime 15
		wm_set_round_timelimit 15

		wm_number_of_objectives 2

		wm_set_main_objective 1 0 
		wm_set_main_objective 1 1

		wm_objective_status 1 0 0 
		wm_objective_status 1 1 0

		wm_set_defending_team 0

		wm_setwinner 0

		wait 2000
	}

		trigger checkgame 
		{ 
			accum 1 inc 1 
			accum 1 abort_if_not_equal 1 

			wm_setwinner 1 
			wm_endround 
		} 
	}

	trigger objective1
	{
		wm_announce "Allied team has breached the Side Wall!"
		setstate SideWall_toi invisible
	}
	trigger objective2
	{
		accum 1 set 1
		
		wm_announce "Allied team has destroyed the SuperComputer!"

		wm_objective_status 4 1 1
		wm_objective_status 4 0 2

		wait 3000

		trigger game_manager checkgame
	}
}

move_platform
{
		trigger platform move_destination
		{
			trigger platform move_dest
		}

		trigger move_to_start
		{
			trigger platform move_start
		}
}

platform
{
		trigger move_dest
		{
			gotomarker point_02 32

		}

		trigger move_start
		{
			gotomarker point_01 32
		}
}
allied_obj1
{
	spawn
	{
		wait 200
		constructible_class 3
	}

	death
	{
		wm_announce "The Side Wall has been Breached!"

		wm_teamvoiceannounce 0 "side_axis_entrance1_destroyed"
		wm_teamvoiceannounce 0 "side_allies_entrance1_desrtoyed"

		wm_removeteamvoiceannounce 0 "side_axis_entrances_defend"
		wm_removeteamvoiceannounce 0 "side_axis_entrance1_defend"

		wm_removeteamvoiceannounce 1 "side_allies_entrances_destroy"
		wm_removeteamvoiceannounce 1 "side_allies_entrance1_destroy"
	}
}
allied_obj2
{
	spawn
	{
		wait 200
		constructible_class 3
	}

	death
	{
		wm_announce "Allies have blown up the Super Computer!"
		setstate SuperComputer invisible
		wm_objective_status 1 0 2
		wm_objective_status 1 1 1

		wait 3000

		
		trigger game_manager checkgame
	}	
}
//==================
//======GuardTower=======
//==================
GuardTower
{
	spawn
	{
		wait 200
		trigger self setup
	
		constructible_class 2
	}

trigger setup
	{
		setstate GuardTower invisible

		setstate GuardTowerSupplies default
	}

buildstart final
	{
		setstate GuardTower underconstruction

		setstate GuardTowerSupplies default
	}

built final
	{

		setstate GuardTower default

		setstate GuardTowerSupplies invisible

		wm_announce "The GuardTower has been constructed."
	}

decayed final
	{
		setstate GuardTower invisible

		setstate GuardTowerSupplies default
	}

death
	{
		setstate GuardTower invisible

		setstate GuardTowerSupplies default

		wm_announce "Axis have destroyed the GuardTower."
	}
}]

(Lock Ness Monster) #120

i tried that code thing, im still confused lol