Jump to content

Mapscripts fixes / tweaks (Beach + Caen2)


Recommended Posts

 Hello,

I think it's better to make a new topic with all the mapscript stuff related, so it's easier to find in a future and to propose / fix / improve the scripts :)

Caen2

Main problem in Caen2 was that there are no sounds (flag captured / tank repaired / tank damaged / bridge repaired / bridge damaged). A simple fix was to find all caen2_ and replace by caen_ as in this example:

wm_addteamvoiceannounce 0 "caen2_axis_city_capture"
wm_addteamvoiceannounce 0 "caen2_axis_tank_steal"

Replace by 

wm_addteamvoiceannounce 0 "caen_axis_city_capture"
wm_addteamvoiceannounce 0 "caen_axis_tank_steal"

This solves all problems except the 'flag captured' sound, as there is actually no 'flag captured' sound in the map. To fix this and have some audio feedback when axis / allies capture the flag, without modifying the pk3 file, what I think is best is to add the generic 'objective captured / objective lost' sound when axis or allies capture flag.

To do this, we must add to the mapscript these lines:

  • Inside trigger axis_capture:
wm_teamvoiceannounce 0 "axis_hq_objective_captured"
wm_teamvoiceannounce 1 "allies_hq_objective_lost"
  • Inside trigger allies_capture:
wm_teamvoiceannounce 0 "axis_hq_objective_lost"
wm_teamvoiceannounce 1 "allies_hq_objective_captured"

So both triggers would look like this:

	trigger axis_capture	// Flag has been touched by an Axis player
	{
		accum 0 abort_if_equal 0 // do Axis own flag?

		accum 0 set 0 // Axis own the pole
		wm_announce	"Axis captured the town!"

                // *----------------------------------- vo ------------------------------------------*
                wm_removeteamvoiceannounce 0 "caen_axis_city_capture"
                wm_removeteamvoiceannounce 1 "caen_allies_city_capture"
                
                wm_teamvoiceannounce 0 "axis_hq_objective_captured"
                wm_teamvoiceannounce 1 "allies_hq_objective_lost"
                // *---------------------------------------------------------------------------------*

                wm_objective_status 		1 0 1
		wm_objective_status 		1 1 2
                wm_set_main_objective 2 0
		wm_set_main_objective 2 1
                alertentity city_wobj
		
	}

	trigger allied_capture	// Flag has been touched by an allied player
	{
		accum 0 abort_if_equal 1 // do Allies own flag?

		accum 0 set 1 // Allied own the flag
		wm_announce	"Allies reclaim the town!"
              

                // *----------------------------------- vo ------------------------------------------*
                wm_addteamvoiceannounce 0 "caen_axis_city_capture"
                wm_addteamvoiceannounce 1 "caen_allies_city_capture"
                
                wm_teamvoiceannounce 0 "axis_hq_objective_lost"
                wm_teamvoiceannounce 1 "allies_hq_objective_captured"
                // *---------------------------------------------------------------------------------*
                 
                wm_objective_status 		1 0 2
		wm_objective_status 		1 1 1
                wm_set_main_objective 1 0
		wm_set_main_objective 1 1
		alertentity city_wobj
               
	}

With this, I think all sounds would be fixed and have a 'flag status audio feedback'.

 

et_beach

Beach has a big problem with spawnkilling on axis bunker so an idea was to make invisible walls in both windows that lead to spawn, and also to remove both MGs so axis can't take advantage from them.

So the job was done by looking into the et_beach.bsp file for the origin coordinates of MG42 and using the func_fakebrush in the mapscript:

/// Invisible walls in Axis spawn windows
delete
{
	origin "2365 3168 1176" // Removes upper MG42
}
delete
{
	origin "2334 2656 920" // Removes lower MG42
}

// Create fake wall in uper window

create
{
  scriptName "roof_bugfix"
  classname "func_fakebrush"
  origin "2345 3166 1170"
  contents 1  // CONTENTS_SOLID
  mins "-15 -200 -60"
  maxs "20 200 100"
}

// Create fake wall in lower window

create
{
  scriptName "roof_bugfix"
  classname "func_fakebrush"
  origin "2334 2656 920"
  contents 1  // CONTENTS_SOLID
  mins "-15 -200 -60"
  maxs "5 200 100"
}

/// End invisible walls

These are tweaked to be 'indise' the window space so players don't get bugged into the fake wall, but can't test alone the explosions (how explosion range from panzer/mortar would affect). Can be modified in a future if needed.

Attached you will see the mapscript files with the modifications described above. These files are based in the original script files included in the pk3 so they don't include any modification from base maps except the ones described in this topic.

 

Any suggestions and improvements are welcome, also from other maps if you'd like some modification, I'm no pro but I can do some research :)

 

et_beach.script caen2.script

  • Like 3
  • Thanks 2
  • TeamMuppet coin 5
Link to comment
Share on other sites

  • 5 months later...

et_beach update

This update fixes the console spam by two missing files: mortar_exp03.wav and mortar_exp04.wav.

It removes the 7 target_speaker  entities referencing these sounds.

The mortars still land on the beach and gameplay is not affected.

The code to do it is simple:

		delete
		{
			origin "-704 3624 304"
		
		}	
		
		delete
		{
			origin "-2368 1792 128"
		
		}	
		delete
		{
			origin "-2368 2520 128"
		
		}

		delete
		{
			origin "-360 1376 304"
		
		}
		delete
		{
			origin "640 2264 416"
		
		}
		
		delete
		{
			origin "488 472 464"
		
		}	
		delete
		{
			origin "-2024 3824 128"
		
		}

I've added it to the mapscript file in the post above with the window blocking and mg removal. feel free to add it to server :)

Before:

2021-11-24-213404-et_beach.thumb.png.6cf9abf864c9ac9c8a058629395ec246.png

After:

2021-11-24-213548-et_beach.thumb.png.4e49d5c7ff7c730ad772e9c0c3010bba.png

et_beach.script

  • Like 2
  • Thanks 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...