Invisible Command Post problem


(Jo0f) #1

Hi,

I’m having problems some problems with creating my command post. The command post is working ingame but it’s invisible, although the clip texture is working for neutral or axis/allies cp.

It’s a neutral cp where allies can spawn when they fix it. The spawn works fine if they fix it but you still can’t see the cp when fixed, same goes for neutral and axis cp. I used the neutral cp prefab and modified the script a little -> so maybe the problem is in there but I can’t find it :(.

Here’s the script, maybe you can find some bug here?

// ============================================================
// ======================command post===========================
// ============================================================

// ================================================

// ================================================
neutral_cp_toi
{
	trigger show_neutral_cabinet			// Show Neutral Closed CP
	{
		setstate neutral_cp_closed default
		setstate neutral_cp_closed_model default
	}

	trigger hide_neutral_cabinet			// Hide Neutral Closed CP
	{
		setstate neutral_cp_closed invisible
		setstate neutral_cp_closed_model invisible
	}
}

// ================================================
allied_cp_open
{
	spawn
	{
		wait 100
		constructible_class 2			// Dyno+Satchel

		trigger self disable_cp_features		// Default charge bar times

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

	trigger disable_cp_features
	{
		setstate allied_cp_open_model invisible	// Hide Open CP model
		setstate wobj_allies_cp_spawn invisible
		setstate cp_allies_spawns invisible
		wm_objective_status 3 1 0

		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

		wm_announce "Axis team has destroyed the Allied Command Post! Allies lost their spawn at the 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 enable_cp_features
	{
		setstate allied_cp_open_model default	// Show open CP model
		setstate wobj_allies_cp_spawn default
		setstate cp_allies_spawns default
		wait 400
		setautospawn "CP Spawns" 1
		wm_objective_status 3 1 1

		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

		wm_announce "Allied Command Post constructed. Allied spawn at the Command Post activated!"
		// *----------------------------------- 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 ------------------------------------------*

	}

	buildstart final
	{
		trigger neutral_cp_toi hide_neutral_cabinet	// Hide Neutral CP model+clip brush
	}

	built final
	{
		trigger self enable_cp_features		// Increase charge bar times
	}

	decayed final
	{
		setstate allied_cp_open_model invisible	// Hide Open CP model
		trigger neutral_cp_toi show_neutral_cabinet	// Show Neutral CP model+clip brush
	}

	death
	{
		trigger neutral_cp_toi show_neutral_cabinet	// Show Neutral CP model+clip brush
		trigger self disable_cp_features		// Default charge bar times

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

// ================================================
axis_cp_open
{
	spawn
	{
		wait 100
		constructible_class 2			// Dyno+Satchel

		trigger self disable_cp_features		// Default charge bar times
	}

	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
	{
		trigger neutral_cp_toi hide_neutral_cabinet	// Hide Neutral CP model+clip brush
	}

	built final
	{
		trigger self enable_cp_features		// Increase charge bar times

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

	decayed final
	{
		setstate axis_cp_open_model invisible	// Hide Open CP model
		trigger neutral_cp_toi show_neutral_cabinet	// Show Neutral CP model+clip brush
	}

	death
	{
		trigger neutral_cp_toi show_neutral_cabinet	// Show Neutral CP model+clip brush
		trigger self disable_cp_features		// Default charge bar times

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

(Loffy) #2

Hi!

Do you have a neutral compost closed model in your map? What is its name (for example neutral_compost_closed_model)?

Loffy


(dwe_flame) #3

if you imported it into your map, always make sure to check all scrip/target/targetname entry’s gtk loves to put numbers behind it by itself. so you will need to remove those numbers again, so the names will be the same as your script calls them :slight_smile:


(-SSF-Sage) #4

My guess is the good old origin-inside-a-structural-brush-problem. Misc_gamemodels dissapears on that problem. Move your cp a bit so the origin is not inside the walls.


(dwe_flame) #5

or make shire the insertion point (the 3 lines blue, red and green) are not in a structural brush.
maybe the wall at that spot can be made detail ?


(-SSF-Sage) #6

Yes, that is called an origin.