i’m trying to script my first objective in my map but am having problems because there is no good scripting posts. i got this error g_scriptaction_objectiveimage: status parameter required. what the hell does that mean. my map is pretty easy blow up one door and wall, and get the documents off a table and run them back to the allied transmitter table to win and i got one forward spawn. but when i run and get the documents game crashes and says g_scriptaction_objectiveimage: status parametter required. pleas help me
What is g_scriptaction_objectiveimage: status
wm_objective_status <objective_number> <team> <status>
You’ve missed the last number somewhere in your script.
you are my new god thanks so much. but now i got a new problem. when i run the docs back to the allied transmitter game dosn’t end it just says i’m near the transmitter
Hi, welcome to the forums.
Here you will find a tutorial about scripting:
http://www.planetwolfenstein.com/4newbies/Map_Scripting_4_Newbies.pdf
And here you will find a tutorial about a stealing type objective:
http://www.planetwolfenstein.com/4newbies/objective.htm
And this is the main page with more tutorials and prefabs:
http://www.planetwolfenstein.com/4newbies/
Just to add to nUllSkillZ post, what you need to end the level is something like this:
wm_setwinner 1 // 0 for axis and 1 for allies
wait 1500
wm_endround
Add a scriptname to the trigger_flagonly_multiples entity and catch the death event in the script to check for the capture.
scriptname
{
death
{
// captured the docs
}
}
still not working guys getting very fustrated with this scrip stuff please take a look at my script the end of it is what is dealing with my trigger_flagonly_multiple
//
//Brush Scripting
//Map: beachgoodcopy1
//Last edited by: =WF=Pigg
//
game_manager
{
spawn
{
// Set the respawn times
wm_allied_respawntime 15
wm_axis_respawntime 25
wm_set_round_timelimit 25
// Set the number of objectives for the map
wm_number_of_objectives 5
// Axis control all objectives at the start (0 == AXIS, 1 == ALLIED)
wm_objective_status 1 0 0
wm_objective_status 1 1 0
// Set Defending Team for SW Mode
wm_set_defending_team 0
// If the round timer expires, the Axis have won, so set the current winning team
// Set the round winner: 0 == AXIS, 1 == ALLIED
wm_setwinner 0
// Accum #1 will be the state of objective number one
accum 1 set 0
// Accum #2 is set after either wall is breached, so that the sirens are set only once
accum 2 set 0
}
trigger objective1
{
// Change the objective state internally, so UI can update, etc.
// Allied takes control of objective #1
wm_objective_status 1 1 0
// Change the variable within the script so that we can check if someone wins the round
accum 1 set 1
// UI pop-up to alert players
wm_announce "Allies transmitted the documents!"
// Call function to check if the round has been won
trigger game_manager checkgame
}
trigger axis_object_stolen
{
// Change the objective state internally, so UI can update, etc.
// Allied have stolen the documents (0 == AXIS, 1 == ALLIED)
wm_objective_status 2 1 0
wm_announce 0 "Allies have stolin the Documents"
wm_announce 1 "We have the Secret Wodanfire Documents"
setstate allied_gold_cm_marker invisible
//turn on sirens
accum 2 abort_if_not_equal 0
alertentity siren_relay
accum 2 set 1
}
trigger axis_object_returned
{
// Change the objective state internally, so UI can update, etc.
// Axis have returned the documents (0 == AXIS, 1 == ALLIED)
wm_objective_status 2 0 0
wm_announce 0 "The Documents have been returned"
wm_announce 1 "The Documents have been returned"
setstate allied_gold_cm_marker default
//turn on sirens
accum 2 abort_if_not_equal 0
alertentity siren_relay
accum 2 set 0
}
trigger checkgame
{
wm_setwinner 1
wait 200
wm_endround
}
trigger allied_objectives
{
trigger game_manager checkgame
}
}
I corrected the script for the allied_objectives part, make sure the trigger_flagonly_multiple has a scriptname key pointed to it.
//
//Brush Scripting
//Map: beachgoodcopy1
//Last edited by: =WF=Pigg
//
game_manager
{
spawn
{
// Set the respawn times
wm_allied_respawntime 15
wm_axis_respawntime 25
wm_set_round_timelimit 25
// Set the number of objectives for the map
wm_number_of_objectives 5
// Axis control all objectives at the start (0 == AXIS, 1 == ALLIED)
wm_objective_status 1 0 0
wm_objective_status 1 1 0
// Set Defending Team for SW Mode
wm_set_defending_team 0
// If the round timer expires, the Axis have won, so set the current winning team
// Set the round winner: 0 == AXIS, 1 == ALLIED
wm_setwinner 0
// Accum #1 will be the state of objective number one
accum 1 set 0
// Accum #2 is set after either wall is breached, so that the sirens are set only once
accum 2 set 0
}
trigger objective1
{
// Change the objective state internally, so UI can update, etc.
// Allied takes control of objective #1
wm_objective_status 1 1 0
// Change the variable within the script so that we can check if someone wins the round
accum 1 set 1
// UI pop-up to alert players
wm_announce "Allies transmitted the documents!"
// Call function to check if the round has been won
trigger game_manager checkgame
}
trigger axis_object_stolen
{
// Change the objective state internally, so UI can update, etc.
// Allied have stolen the documents (0 == AXIS, 1 == ALLIED)
wm_objective_status 2 1 0
wm_announce 0 "Allies have stolin the Documents"
wm_announce 1 "We have the Secret Wodanfire Documents"
setstate allied_gold_cm_marker invisible
//turn on sirens
accum 2 abort_if_not_equal 0
alertentity siren_relay
accum 2 set 1
}
trigger axis_object_returned
{
// Change the objective state internally, so UI can update, etc.
// Axis have returned the documents (0 == AXIS, 1 == ALLIED)
wm_objective_status 2 0 0
wm_announce 0 "The Documents have been returned"
wm_announce 1 "The Documents have been returned"
setstate allied_gold_cm_marker default
//turn on sirens
accum 2 abort_if_not_equal 0
alertentity siren_relay
accum 2 set 0
}
trigger checkgame
{
wm_setwinner 1
wait 200
wm_endround
}
}
// trigger_flagonly_multiple is not part of the game_manager, needs to be outside it's block { ... }
// and have the death event defined:
allied_objectives
{
death
{
trigger game_manager checkgame
}
}
OH MY GOD, THANK YOU SO MUCH. i don’t know how to repay you for your help works like a charm. i still got acouple of bug to work out but that was the hardes so far