stealable objectives


(funRut) #1

hey
in my map i want to make documents that need to be stolen by the allieds
and put into an truck (doesnt need to drive)
then the map need to end
i did look at a lot of tutorials but it wont work :stuck_out_tongue:
i think there is a mistake in the connection script->map
hope you can help me
here is my script until now


game_manager
{
spawn
{
wm_axis_respawntime 4
wm_allied_respawntime 4
wm_number_of_objectives 2
wm_set_round_timelimit 30
// 1: steal documents
wm_set_main_objective 1 1
wm_objective_status 1 1 0
wm_set_defending_team	0
wm_setwinner	0
accum 1 set 0
}
// secuir the documents
trigger objective1
{
wm_objective_status 1 1 1
trigger game_manager checkgame
}
// steal the documents
trigger axis_object_stolen
{
accum 1 set 1
wm_announce "Allied team is escaping with the Documents!"
}
// Returned the documents
trigger axis_object_returned
{
accum 1 set 0
}
trigger checkgame
{
accum 1 abort_if_not_equal 1
wm_setwinner 1
wait 1500
wm_endround
}
}

transmitter_obj
{
spawn
{
}
death
{
trigger game_manager objective1
}
}
// ================================================
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

		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
	{
		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 "Allied Command Post constructed. Charge speed increased!"
		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 0 "axis_hq_compost_constructed_allies"
		wm_teamvoiceannounce 1 "allies_hq_compost_constructed"
		wm_removeteamvoiceannounce 1 "allies_hq_compost_construct"
		// *----------------------------------- vo ------------------------------------------*
	}

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

	 	 	 


// Gates 1 and 2
gate1 //main gate
{
	spawn
	{
		wait 300
		constructible_class 3 // 2=satchel  3=dyna
	}

	death
	{
		alertentity gate1_bits
		trigger gate1_toi remove

		wm_announce "The Allies have destroyed the Main gate!"
	}
}

gate1_toi
{
	trigger remove
	{
		remove
	}
}
gate2 //side gate
{
	spawn
	{
		wait 300
		constructible_class 3 // 2=satchel  3=dyna
	}

	death
	{
		alertentity gate2_bits
		trigger gate2_toi remove

		wm_announce "The Allies have destroyed the Side gate!"
	}
}

gate2_toi
{
	trigger remove
	{
		remove
	}
}

-Rut.

Ps. my g-map doesnt work also if i pres g (or limbo) i cand see icons (they are autside the screen)


(masterkiller) #2

look more like this:


transmitter_obj
{
	spawn
	{
	}

	trigger stolen
	{
	}

	trigger dropped
	{
	}


	trigger returned
	{
	}

	trigger captured
	{
		wm_objective_status 1 1 1
                wm_announce "Allied team is escaping with the Documents!"
		trigger game_manager checkgame
	}
}


And in checkgame, delete this:


accum 1 abort_if_not_equal 1


(funRut) #3

lol tanx man :slight_smile:
it works great :smiley:

-Rut.


(funRut) #4

ok i was happy to early it did work only one time
after that i could bring the obj but map wasnt ended now
ingame i have 2 boxes one whit the obj
and the other whit a box where to bring it
the entrys off the box where to bring it are

classname trigger_flagonly_multype
scriptname transmitter_obj

i can pic up the obj and walk to the place to bring it
and then he obj disapear like the map is ended but it wont end
and theobj doesnt return to his waiting place

tanx already for your help =)

-Rut.

game_manager
{
spawn
{
wm_axis_respawntime 4
wm_allied_respawntime 4
wm_number_of_objectives 2
wm_set_round_timelimit 30
// 1: steal documents
wm_set_main_objective 1 1
wm_objective_status 1 1 0
wm_set_defending_team	0
wm_setwinner	0
accum 1 set 0
}
// secuir the documents
trigger transmitter_obj
{
wm_objective_status 1 1 1
trigger game_manager checkgame
}
// steal the documents
trigger axis_object_stolen
{
accum 1 set 1
wm_announce "Allied team is escaping with the Documents!"
}
// Returned the documents
trigger axis_object_returned
{
accum 1 set 0
}
trigger checkgame
{
wm_setwinner 1
wait 1500
wm_endround
}
}
transmitter_obj
{
	spawn
	{
	}

	trigger stolen
	{
	}

	trigger dropped
	{
	}


	trigger returned
	{
	}

	trigger captured
	{
		wm_objective_status 1 1 1
                wm_announce "Allied team is escaping with the Documents!"
		trigger game_manager checkgame
	}
}
// ================================================
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

		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
	{
		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 "Allied Command Post constructed. Charge speed increased!"
		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 0 "axis_hq_compost_constructed_allies"
		wm_teamvoiceannounce 1 "allies_hq_compost_constructed"
		wm_removeteamvoiceannounce 1 "allies_hq_compost_construct"
		// *----------------------------------- vo ------------------------------------------*
	}

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

	 	 	 


// Gates 1 and 2
gate1 //main gate
{
	spawn
	{
		wait 300
		constructible_class 3 // 2=satchel  3=dyna
	}

	death
	{
		alertentity gate1_bits
		trigger gate1_toi remove

		wm_announce "The Allies have destroyed the Main gate!"
	}
}

gate1_toi
{
	trigger remove
	{
		remove
	}
}
gate2 //side gate
{
	spawn
	{
		wait 300
		constructible_class 3 // 2=satchel  3=dyna
	}

	death
	{
		alertentity gate2_bits
		trigger gate2_toi remove

		wm_announce "The Allies have destroyed the Side gate!"
	}
}

gate2_toi
{
	trigger remove
	{
		remove
	}
}




(phisherman) #5

[QUOTE=funRut;236523]classname trigger_flagonly_multype[/quote]It’s called trigger_flagonly_multiple, dunno if you just got it wrong here or also in your map.[quote=funRut;236523]and then he obj disapear like the map is ended but it wont end[/quote]So the OBJ is delivered? The ! above your head disappears and there’s this announcement ā€œAllied team is escaping with the Documents!ā€?[quote=funRut;236523]and theobj doesnt return to his waiting place[/quote]What is your waiting place? The place you need to steal the OBJ from or the place you need to deliver it to?

It would be nice to have an overview of your two entities. Could you make screenshots of the entity menu (the one that appears if you press [N]) of both entites or post all keys/values here? This would make it a lot easier to help you.


(funRut) #6

yes but the announcement happens when i pickup the documents
if i deliver them nothing happens only the ! disapear

[QUOTE=Phishermans Phriend;236539]What is your waiting place? The place you need to steal the OBJ from or the place you need to deliver it to?
[/QUOTE]
the place where i steal the obj

here is the screenshot

tnx for your help


(masterkiller) #7

well, the problem is you put the scriptname to the wrong entity.

you need to put the scriptname at this entity
team_CTF_redflag


(funRut) #8

[QUOTE=masterkiller;236553]well, the problem is you put the scriptname to the wrong entity.

you need to put the scriptname at this entity
team_CTF_redflag[/QUOTE]
i dont know alot about scripting where can i put it?


(masterkiller) #9

you see on the pics, the trigger_flagoly_multiple have a scriptname. YOu don’t need that
delete it
put it on team_CTF_redflag entity

scriptname transmitter_obj

edit:
In your script, you can delete that:

in spawn


accum 1 set 0

and this


// secuir the documents
trigger transmitter_obj
{
wm_objective_status 1 1 1
trigger game_manager checkgame
}
// steal the documents
trigger axis_object_stolen
{
accum 1 set 1
wm_announce "Allied team is escaping with the Documents!"
}
// Returned the documents
trigger axis_object_returned
{
accum 1 set 0
}



(funRut) #10

[QUOTE=masterkiller;236556]you see on the pics, the trigger_flagoly_multiple have a scriptname. YOu don’t need that
delete it
put it on team_CTF_redflag entity

scriptname transmitter_obj

edit:
In your script, you can delete that:

in spawn


accum 1 set 0

and this


// secuir the documents
trigger transmitter_obj
{
wm_objective_status 1 1 1
trigger game_manager checkgame
}
// steal the documents
trigger axis_object_stolen
{
accum 1 set 1
wm_announce "Allied team is escaping with the Documents!"
}
// Returned the documents
trigger axis_object_returned
{
accum 1 set 0
}


[/QUOTE]
tnx it did work :slight_smile:
i wil remove the parts from my script now

EDIT:
the parts are removed it still works :slight_smile:
realy tanx man :smiley:


(masterkiller) #11

YW funrut

Have fun whit mapping :slight_smile: