Shoot model as objective


(Devastator) #1

Ahem ,

Its been a while since my last visit … i have however bumped into some trouble …

i want to use a model to be shot as objective ,

now everything is working fine , except for the part when people actually shoot the model … it will not end the game . i think this is due to the kill_target ( legacy from a map im trying to port into the ET engine)

i have tried ( script wise ) to make it constructable_class 3 / 2 / 1 the model dies but there is nothing telling it should end the game

(bit of code)

trigger axis_objective6
{
	// Change the objective state internally, so UI can update, etc.
	// Axis shoot mooman ..
	wm_objective_status 	6	0	1
	wm_objective_status 	6	1	2

	// Show message on screen
	wm_announce	"The Mooman is no more!!!!"

	wait 2000

	// Set the round winnerto allied  0 == AXIS, 1 == ALLIED
	wm_setwinner 0

	// End the round
	wm_endround

}

}
axis_obj6
{
spawn
{
constructible_class 2
}

death
{
	//call the function in game_manager
	//trigger kill_moo setaccum2
	trigger game_manager axis_objective6
}

}

is there another way? to get this working ?


(CoD4Fun) #2

how much do you know about scripting/entities ?

a script_mover and its events might help you out a bit here.


(Devastator) #3

it has a script mover …

kill_moo
{
spawn
{
accum 2 set 0
}

trigger animation
{
accum 2 abort_if_not_equal 0
accum 1 random 3
}

trigger setaccum2
{
accum 2 set 1
}


trigger shot
{
alertentity moo_shot
alertentity moo2_shot
wait 1300
alertentity office_desk
}

}

as i said before … everything functions … the guy dies … there is no end to the game …
so somewhere along the line the entity does not die …

this worked in wolf … only not in ET …


(CoD4Fun) #4

are you working with target_script_triggers ? i would really recommend you to always base your scripting on events whereever possible. it is so much easier.

here a list for the script_mover events: http://games.chruker.dk/enemy_territory/scripting_reference.php#entity_events death is what you are looking for. dont know your skill so ask if you dont know how to apply this.


(CoD4Fun) #5

place that

wm_endround

in the death routine.


(CoD4Fun) #6

are you working with target_script_triggers ? i would really recommend you to always base your scripting on events whereever possible. it is so much easier.

here a list for the script_mover events: http://games.chruker.dk/enemy_territory/scripting_reference.php#entity_events death is what you are looking for.

then place a wm_endround in your death routine and it should work.