scripts


(Kynval) #1

hey…

Now i need srpit or lua file to make spawn in CP allies in fueldump map…
And script to add health and ammo packs…
I hope you can give me ready script :smiley:

please help me ^^ :cool:


(TomTom7777) #2

Do you mean map script changes? Bani made some way-back in 2004. Don’t have the original handy but here are similar ones from the latest FritzBot Waypoint Pak (to be released Friday)

In game_manager add in the spawn section these creates;


game_manager
{
	spawn
	{
		create
		{
			scriptName "fueldumphq_obj"
			classname "team_WOLF_objective"
			targetname "fueldumphq_obj"
			//origin "-10853 -2036 6"	// z = CC_FILTER_ALLIES(2) | CC_FILTER_SPAWNS(4)
			origin "-11072 -2388 6"	// z = CC_FILTER_ALLIES(2) | CC_FILTER_SPAWNS(4)
			spawnflags 2	// TEAM_ALLIES(2)
		}

		create
		{
			scriptName "fueldumphq_spawn1"
			classname "team_CTF_bluespawn"
			targetname "fueldumphq_spawn"
			origin "-11072 -2448 542"  //was origin "11072 -2448 582" !!!
			spawnflags 2	// TEAM_ALLIES
		}

		create
		{
			scriptName "fueldumphq_spawn2"
			classname "team_CTF_bluespawn"
			targetname "fueldumphq_spawn"
			origin "-10995 -2448 542"
			spawnflags 2	// TEAM_ALLIES
		}

//		create  // uncomment to include extra spawn
//		{
//			scriptName "fueldumphq_spawn3"
//			classname "team_CTF_bluespawn"
//			targetname "fueldumphq_spawn"
//			origin "-10918 -2448 542"
//			spawnflags 2	// TEAM_ALLIES
//		}

		create
		{
			scriptName "fueldumphq_spawn4"
			classname "team_CTF_bluespawn"
			targetname "fueldumphq_spawn"
			origin "-11149 -2448 542" //was origin "-10841 -2448 582"
			spawnflags 2	// TEAM_ALLIES
		}

		create
		{
			scriptName "fueldumphq_spawn5"
			classname "team_CTF_bluespawn"
			targetname "fueldumphq_spawn"
			origin "-11072 -2288 542"
			spawnflags 2	// TEAM_ALLIES
		}

		create
		{
			scriptName "fueldumphq_spawn6"
			classname "team_CTF_bluespawn"
			targetname "fueldumphq_spawn"
			origin "-10995 -2288 542"
			spawnflags 2	// TEAM_ALLIES
		}

//		create // uncomment to include extra spawn
//		{
//			scriptName "fueldumphq_spawn7"
//			classname "team_CTF_bluespawn"
//			targetname "fueldumphq_spawn"
//			origin "-10918 -2288 542"
//			spawnflags 2	// TEAM_ALLIES
//		}

		create
		{
			scriptName "fueldumphq_spawn8"
			classname "team_CTF_bluespawn"
			targetname "fueldumphq_spawn"
			origin "-11149 -2288 542" ///was origin "-10841...
			spawnflags 2	// TEAM_ALLIES
		}

At the end of the map file add


//bani
fueldumphq_obj
{
	spawn
	{
		set
		{
			//these have to be set inside the spawn{} function, not create{}
			description "Garage HQ"
			message "Garage HQ"
		}
		wait 50
		setstate fueldumphq_obj invisible
		setstate fueldumphq_spawn invisible
	}

	trigger on
	{               
		setstate fueldumphq_obj default
		setstate fueldumphq_spawn default
	}

	trigger off
	{
		setstate fueldumphq_obj invisible
		setstate fueldumphq_spawn invisible
	}
}

At the end of the built final and the death events for the Allied Cp (allied_radio_built) add the lines with “trigger fueldumphq_obj…”. Add the line “setautospawn “Garage HQ” 1” if you want to force the Allies to spawn there.


allied_radio_built
{
. . .

	built final
	{
		trigger allied_radio_built_model show
		trigger allied_radio_closed hide
		trigger allied_radio_destroyed hide

		trigger allied_radio_built_model enable_allied_features
		enablespeaker alliedhq_sound

		[B]//bani
		trigger fueldumphq_obj on

		//allies should spawn here when built -crapshoot
		setautospawn "Garage HQ" 1[/B]
	}

	death
	{
		trigger allied_radio_built_model hide
		trigger allied_radio_destroyed show

		trigger allied_radio_built_model disable_allied_features
		disablespeaker alliedhq_sound

		[B]//bani
		trigger fueldumphq_obj off[/B]
	}
}

That should be everything. (requires ET 2.60 or later)

For your second request what exactly are you asking for?


(Kynval) #3

and when I finish it i have to put this to folder ‘mapscripts’ and change here:

g_mapScriptDirectory “mapscripts”

or how?

or change fueldump.script from pak0?


(TomTom7777) #4

Get a copy of maps\fueldump.script from pak0.pk3 (i.e. unzip).
Open copy of fueldump.script with notepad. Add the changes.
Verify your changes (i.e. no missing braces } )
Then create a new pk3 named like z_fueldump_Kynval.pk3
Add the edited fueldump.script inside z_fueldump_Kynval.pk3(in a maps directory)
Put z_fueldump_Kynval.pk3 in \etmain

BTW if you add
wm_announce “with CP spawns”
after the V.O. section of game_manager, you will see whether the new script file is loaded when the map starts.


(Kynval) #5

never mind… is working :smiley:
but thx for your help

here are ready scripts:

http://bani.anime.net/banimod/forums/viewtopic.php?p=57517