Command Post Problem


(GTBGranny) #1

Hi Guys, I have recently updated my map and for some reason now the command posts are not being built correctly.

I wonder if someone can look at this script and tell me what I have done wrong.

If it matters, I have recently added the gate and changed who is attacking to the Axis, as well as making it only one radio to be blown up by the Axis

Also, I have just tested the map and when the allies capture the flag the game crashes with:

G_Scripting: alertentity cannot find targetname “forward_wobj”

But it used to work !


game_manager
{
	spawn
	{
		wm_axis_respawntime	10
		wm_allied_respawntime	10
		wm_set_round_timelimit	30

		// Stopwatch mode defending team (0=Axis, 1=Allies)
		wm_set_defending_team	1

		// Winner on expiration of round timer (0=Axis, 1=Allies, -1=Nobody)
		wm_setwinner 1

		wait 500
            
            setstate forward_wobj invisible

		setautospawn "Forward Flag" 0
		setautospawn "Forward Flag" 1
	}

trigger checkgame_allies
        {
         	wm_setwinner 1
		wait 2000
		wm_endround
        }


trigger checkgame_axis
        {
         	wm_setwinner 0
		wait 2000
		wm_endround
        }
}

radio_equipment_axis
{
        spawn
        {
                wait 50
		constructible_class 3
        }

        death
        {
                wm_announce "Axis have destroyed the radio equipment!"
                trigger game_manager checkgame_axis

        }
}

// ================================================
allied_cp_open
{
	spawn
	{
		wait 100
		accum 0 set 0			// 0=CP Closed, 1=CP Damaged
		constructible_class 2			// Dyno+Satchel

		trigger self disable_cp_features		// Default charge bar times
		setstate allied_cp_damaged invisible	// Hide damaged CP clipbrush+model
		setstate allied_cp_damaged_model invisible

		wait 1000

		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 1 "allies_hq_compost_construct"
		wm_addteamvoiceannounce 1 "allies_hq_compost_construct"
		// *----------------------------------- vo ------------------------------------------*
	}

	trigger disable_cp_features
	{
		setstate allied_cp_open_model invisible	// Hide Open CP model

		setchargetimefactor 1 soldier 1
		setchargetimefactor 1 lieutenant 1
		setchargetimefactor 1 medic 1
		setchargetimefactor 1 engineer 1
		setchargetimefactor 1 covertops 1

		sethqstatus 1 0			// Landmines team warning message
		disablespeaker speaker_allied_cp		// Disable morse code sound
	}

	trigger enable_cp_features
	{
		setstate allied_cp_open_model default	// Show open CP model

		setchargetimefactor 1 soldier 0.75
		setchargetimefactor 1 lieutenant 0.75
		setchargetimefactor 1 medic 0.75
		setchargetimefactor 1 engineer 0.75
		setchargetimefactor 1 covertops 0.75

		sethqstatus 1 1			// Landmines team warning message
		enablespeaker speaker_allied_cp		// Enable morse code sound
	}

	buildstart final
	{
		setstate allied_cp_closed invisible		// Hide closed CP clipbrush+model
		setstate allied_cp_closed_model invisible
		setstate allied_cp_damaged invisible	// Hide damaged CP clipbrush+model
		setstate allied_cp_damaged_model invisible
	}

	built final
	{
		accum 0 set 1			// Only show the damaged CP model
		trigger self enable_cp_features		// Increase charge bar times

		wm_announce "Allied Command Post constructed. Charge speed increased!"
		// *----------------------------------- vo ------------------------------------------*
		wm_removeteamvoiceannounce 1 "allies_hq_compost_construct"
		wm_teamvoiceannounce 1 "allies_hq_compost_constructed"

		wm_teamvoiceannounce 0 "axis_hq_compost_constructed_allies"
		wm_addteamvoiceannounce 0 "axis_hq_compost_constructed_allies"
		// *----------------------------------- vo ------------------------------------------*
	}

	decayed final
	{
		setstate allied_cp_open_model invisible	// Hide Open CP model
		trigger self show_damaged_cabinet	// Show previous cabinet state
		trigger self show_closed_cabinet
	}

	death
	{
		trigger self show_damaged_cabinet	// Show damaged CP model
		trigger self disable_cp_features		// Default charge bar times

		wm_announce "Axis team has destroyed the Allied Command Post!"
		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 1 "allies_hq_compost_damaged"
		wm_addteamvoiceannounce 1 "allies_hq_compost_construct"

		wm_removeteamvoiceannounce 0 "axis_hq_compost_constructed_allies"
		// *----------------------------------- vo ------------------------------------------*
	}

	trigger show_closed_cabinet
	{
		accum 0 abort_if_equal 1		// Closed cabinet active yet?
		setstate allied_cp_closed default
		setstate allied_cp_closed_model default
	}

	trigger show_damaged_cabinet
	{
		accum 0 abort_if_equal 0		// Damaged cabinet active yet?
		setstate allied_cp_damaged default
		setstate allied_cp_damaged_model default
	}
}

// ================================================
axis_cp_open
{
	spawn
	{
		wait 100
		accum 0 set 0			// 0=CP Closed, 1=CP Damaged
		constructible_class 2			// Dyno+Satchel

		trigger self disable_cp_features		// Default charge bar times
		setstate axis_cp_damaged invisible	// Hide damaged CP clipbrush+model
		setstate axis_cp_damaged_model invisible

		wait 1000
		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 0 "axis_hq_compost_construct"
		wm_addteamvoiceannounce 0 "axis_hq_compost_construct"
		// *----------------------------------- vo ------------------------------------------*
	}

	trigger disable_cp_features
	{
		setstate axis_cp_open_model invisible	// Hide Open CP model

		setchargetimefactor 0 soldier 1
		setchargetimefactor 0 lieutenant 1
		setchargetimefactor 0 medic 1
		setchargetimefactor 0 engineer 1
		setchargetimefactor 0 covertops 1

		sethqstatus 0 0			// Landmines team warning message
		disablespeaker speaker_axis_cp		// Disable morse code sound
	}

	trigger enable_cp_features
	{
		setstate axis_cp_open_model default	// Show open CP model

		setchargetimefactor 0 soldier 0.75
		setchargetimefactor 0 lieutenant 0.75
		setchargetimefactor 0 medic 0.75
		setchargetimefactor 0 engineer 0.75
		setchargetimefactor 0 covertops 0.75

		sethqstatus 0 1			// Landmines team warning message
		enablespeaker speaker_axis_cp		// Enable morse code sound
	}

	buildstart final
	{
		setstate axis_cp_closed invisible		// Hide closed CP clipbrush+model
		setstate axis_cp_closed_model invisible
		setstate axis_cp_damaged invisible	// Hide damaged CP clipbrush+model
		setstate axis_cp_damaged_model invisible
	}

	built final
	{
		accum 0 set 1			// Only show the damaged CP model
		trigger self enable_cp_features		// Increase charge bar times

		wm_announce "Axis Command Post constructed. Charge speed increased!"
		// *----------------------------------- vo ------------------------------------------*
		wm_removeteamvoiceannounce 0 "axis_hq_compost_construct"
		wm_teamvoiceannounce 0 "axis_hq_compost_constructed"

		wm_teamvoiceannounce 1 "allies_hq_compost_constructed_axis"
		wm_addteamvoiceannounce 1 "allies_hq_compost_constructed_axis"
		// *----------------------------------- vo ------------------------------------------*
	}

	decayed final
	{
		setstate axis_cp_open_model invisible	// Hide Open CP model
		trigger self show_damaged_cabinet	// Show previous cabinet state
		trigger self show_closed_cabinet
	}

	death
	{
		trigger self show_damaged_cabinet	// Show damaged CP model
		trigger self disable_cp_features		// Default charge bar times

		wm_announce "Allied team has destroyed the Axis Command Post!"
		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 0 "axis_hq_compost_damaged"
		wm_addteamvoiceannounce 0 "axis_hq_compost_construct"

		wm_removeteamvoiceannounce 1 "allies_hq_compost_constructed_axis"
		// *----------------------------------- vo ------------------------------------------*
	}

	trigger show_closed_cabinet
	{
		accum 0 abort_if_equal 1		// Closed cabinet active yet?
		setstate axis_cp_closed default
		setstate axis_cp_closed_model default
	}

	trigger show_damaged_cabinet
	{
		accum 0 abort_if_equal 0		// Damaged cabinet active yet?
		setstate axis_cp_damaged default
		setstate axis_cp_damaged_model default
	}
}

forward_flag
{
      spawn 
      {
             accum 0 set 2                            // Who owns flag: 0-Axis, 1-Allied, 2-Nobody
      }
      trigger axis_capture                            // Touched by an Axis player
      {
                   accum 0 abort_if_equal 0           // do Axis own flag?
                   accum 0 trigger_if_equal 1 forward_flag axis_reclaim // Reclaimed from Allies
                   
                   accum 0 set 0                      // Axis own the flag
                   wm_announce "Axis have captured the Forward Flag!"
                   
                   setstate forward_wobj default
      }
      trigger axis_reclaim
      {
                   alertentity forward_wobj           // Switch command map marker
      }
      trigger allied_capture                          // 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 have captured the Forward Flag!"
                   
                   setstate forward_wobj default
                   alertentity forward_wobj           // Switch command map marker
      }

}

eastgate
{
   spawn
   {
      wait 200
      constructible_class 3
   }
   death
   {
      wm_announce "Axis have blown up the Gate!"
   }
}




Cheers
Granny


(GTBGranny) #2

Just to add to this problem.

When I try and build the map the last message that flashes is up is AP Too many open files.

Then the map doesn’t produce a bsp now.

Completely confused now !


(-SSF-Sage) #3

Read the error of yours. "Cannot find (entity with) targetname “forward_wobj”. It says it can’t find it. You might have accidentally deleted or renamed the wobj. So check that you have it around the spawnpoints and that it has right targetname.

For the other problem, it has been solved many times over to forums, but because I never had it, I don’t remember. Anyways, you are mapping and testing maps on a clean installation of ET, right? If you don’t, then do.


(GTBGranny) #4

Well I have solved the problems except the command posts.

The AP Too many files error was solved by deleting a load of pk3s from etmain.

As for the flag, I gave up with that and just made a new one.

Still not sure why the command posts aren’t working though.

Cheers
Granny


(-SSF-Sage) #5

[QUOTE={GTB} Granny;183226]

The AP Too many files error was solved by deleting a load of pk3s from etmain.

Cheers
Granny[/QUOTE]

That’s what I thought, so that’s why I said to do mapping and testing on a fresh installation. I’d suggest you to make a new installation with all the required patches and put your mapping files into it.


(GTBGranny) #6

I have tried everything I can think of, from deleting the +1 in the entity and checking the multiplayer script is there to completely deleting the command posts and putting them back in.

I’m sure there must be something wrong with the above script.

Maybe I have put some {} in the wrong place or something !


(GTBGranny) #7

Well that was a whole day wasted trying to fix that.

I have uploaded the map here if anyone wants to take a look.

Most of it is working how I wanted except for the command posts.

Feel free to take a look, I am absolutley bamboozeled by the problem.

http://cid-20c7b9674e1fe7b6.skydrive.live.com/self.aspx/Enemy%20Territory/ET%20Main/mad30.pk3

I’ve called it mad30 for the time being.

Cheers
Granny


(TomTom7777) #8

Your setstate commands are targeting the scriptname instead of the targetnames. You added a “1” to the scriptname to make your target names

{
"classname" "misc_gamemodel"
"scriptname" "allied_cp_damaged_model"
"targetname" "allied_cp_damaged_model1"
"skin" "models/mapobjects/radios_sd/compostallieddamaged.skin"
"model" "models/mapobjects/radios_sd/compostallieddamaged.md3"
"origin" "2607 2763 768"
"modelscale" "1.5"
}

so for example;


allied_cp_open
{
	spawn
	{
		wait 100
		accum 0 set 0			// 0=CP Closed, 1=CP Damaged
		constructible_class 2			// Dyno+Satchel

		trigger self disable_cp_features		// Default charge bar times
		setstate allied_cp_damaged invisible	// Hide damaged CP clipbrush+model
		setstate allied_cp_damaged_model invisible

should be


allied_cp_open
{
	spawn
	{
		wait 100
		accum 0 set 0			// 0=CP Closed, 1=CP Damaged
		constructible_class 2			// Dyno+Satchel

		trigger self disable_cp_features		// Default charge bar times
		setstate allied_cp_damaged1 invisible	// Hide damaged CP clipbrush+model
		setstate allied_cp_damaged_model1 invisible

and BTW these textures were not included: textures/chateau/wall_c01 and textures/terrain/straw


(GTBGranny) #9

Many thanks for that TomTom7777.

I really appreciate the help on that.

I have updated the map now and you can find the link below.

There are a few things that I need to do before I release a final version such as add landmine capability, but I’m a bit perplexed by that at the minute.

If you can give me any feedback on the map as it stands, any comments would be greatly appreciated.

http://cid-20c7b9674e1fe7b6.skydrive.live.com/self.aspx/Enemy%20Territory/ET%20Main/mad30.pk3

Once again, many thanks
Cheers
Granny


(ailmanki) #10

set r_showtris 2
and walk around in your map, then maybe optimise that a bit… allthough I had no fps issues.

Add a terrain, that gives lots of atmosphere. add a command map, you can still have the logo of your clan somewhere.

Then on capturing flag as axis, I spawned where allies does spawn?
If the spawn should be outside maybe protect it somehow from airstrikes and such…
The hidden door is well hidden… lool.
Add some rooms… fight in house is nice thing… But do not add doors…