Problem with command post


(Theisy) #1

When I start the game my command post (axis) is in a state of closed and open at the same time :eek2:

Then once I build it it’s fine but when I destroy it, it is in a state of open and destroyed at the same time :eek3:

Here is the script I’m using



axis_radio_destroyed
{
	spawn
	{
		wait 400
		setstate axis_radio_destroyed invisible
		setstate axis_radio_destroyed_model invisible
	}

	trigger hide
	{
		setstate axis_radio_destroyed invisible
		setstate axis_radio_destroyed_model invisible
	}

	trigger show
	{
		accum 0 abort_if_equal 0
		setstate axis_radio_destroyed default
		setstate axis_radio_destroyed_model default
	}

	trigger enable
	{
		accum 0 set 1
	}
}

axis_radio_closed
{
	trigger hide
	{
		setstate axis_radio_closed invisible
		setstate axis_radio_closed_model invisible
	}

	trigger show
	{
		accum 0 abort_if_equal 1
		setstate axis_radio_closed default
		setstate axis_radio_closed_model default
	}

	trigger disable
	{
		accum 0 set 1
	}
}

axis_radio_built
{
	spawn
	{
		wait 400

		constructible_class 2

		trigger axis_radio_built setup
	}

	trigger setup
	{
		setchargetimefactor 0 soldier 1
		setchargetimefactor 0 lieutenant 1
		setchargetimefactor 0 medic 1
		setchargetimefactor 0 engineer 1
		setchargetimefactor 0 covertops 1
		sethqstatus 0 0
	}

	buildstart final
	{
		trigger axis_radio_built_model trans

		trigger axis_radio_destroyed hide
		trigger axis_radio_closed 	hide
	}

	built final
	{
		trigger axis_radio_built_model show

		trigger axis_radio_destroyed enable
		trigger axis_radio_closed 	disable

		trigger axis_radio_built_model enable_axis_features

		enablespeaker axis_compost_sound
	}

	decayed final
	{
		trigger axis_radio_built_model hide

		trigger axis_radio_destroyed show
		trigger axis_radio_closed 	show
	}

	death
	{
		trigger axis_radio_built_model hide

		trigger axis_radio_destroyed show

		trigger axis_radio_built_model disable_axis_features

		disablespeaker axis_compost_sound
	}
}

axis_radio_built_model
{
	spawn
	{
		wait 400
		setstate axis_radio_built_model invisible
	}

	trigger show
	{
		setstate axis_radio_built_model default
	}

	trigger hide
	{
		setstate axis_radio_built_model invisible
	}

	trigger trans
	{
		setstate axis_radio_built_model underconstruction
	}

	trigger enable_axis_features
	{
		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

		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 ------------------------------------------*

		wm_objective_status 8 1 2
		wm_objective_status 8 0 1

	}

	trigger disable_axis_features
	{
		// Some kind of UI pop-up to alert players
		wm_announce	"Allied team has destroyed the Axis Command Post!"

		// *----------------------------------- vo ------------------------------------------*
		wm_addteamvoiceannounce 0 "axis_hq_compost_construct"

		wm_teamvoiceannounce 0 "axis_hq_compost_damaged"
		// *----------------------------------- vo ------------------------------------------*

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

		wm_objective_status 8 1 0
		wm_objective_status 8 0 0
	}
}


axis_command_post_lms_toi
{
	spawn
	{
		wait 400

		remove
	}
}

axis_radio_lms_closed
{
	spawn
	{
		wait 400

		remove
	}
}

axis_radio_lms_destroyed
{
	spawn
	{
		wait 400

		remove
	}
}

axis_radio_built_lms
{
	spawn
	{
		wait 400

		remove
	}
}

axis_radio_closed_lms_model
{
	spawn
	{
		wait 400

		remove
	}
}

axis_radio_destroyed_lms_model
{
	spawn
	{
		wait 400

		remove
	}
}

axis_radio_built_lms_model
{
	spawn
	{
		wait 400

		remove
	}
}

axis_command_post_clip_lms
{
	spawn
	{
		wait 400

		remove
	}
}



(Theisy) #2

OK I don’t THINK it’s a problem with my script I think it’s a problem with my entities.

I think the problem lies with my func_constructible as when I made this it wouldn’t let me include the built command post. At the time I thought nothing of it but now the built command post is always there :frowning:


(Theisy) #3

Is this better or worse??

I have now after doing it all again gotten it to work properly with one exception.

The command post doesn’t show when closed, the clips are all there as is the trigger but when closed it doesn’t show up :banghead:


(Chis) #4

I had trouble with that too. Then I realized you don’t include any of the models in the func_constructable. Just give the models their respective keys.

scriptname: axis_radio_built_model
targetname: axis_radio_built_model

scriptname: axis_radio_closed_model
targetname: axis_radio_closed_model

scriptname: axis_radio_destroyed_model
targetname: axis_radio_destroyed_model


(Theisy) #5

It’s always the stupid errors isn’t it :angry:

I made the command map using entity keys and values from fueldump but the script from Oasis. Therefore it didn’t work.

I’ve fixed it now and watch out for a tutorial on making command posts. (not neutral ones though :wink: )

Tutorial to be found here:

http://www.splashdamage.com/forums/viewtopic.php?t=2976

[EDIT] I have added my tutorial :clap: