I have a last flaw in my script. When the gold bars are secured and brought to the tank I don’t get the voiceannounce that the objective is secured. As I’m running the original yet modified GR script, I don’t see the mistake. Any ideas? Guess I need to show you my script for getting propper help, no?
My last flaw in the script
Do you have a \sound\scripts\mapname.sounds with the line called at secured trigger?
How many gold bars? If you have a different amount than Gold Rush you’ll need to do some editing
yes, since the objectives are quite similar to GR I have the \Sound\scripts\mapname.Sound file and the Scripting part for the Gold identical to GR.
so here the Scripting part for teh Gold:
// *********************************************
// ****************** GOLD STUFF ***************
// *********************************************
gold_crate
{
spawn
{
accum 0 set 0 // gold counter
}
trigger stolen
{
accum 0 inc 1
accum 0 trigger_if_equal 1 gold_crate stolen1
accum 0 trigger_if_equal 2 gold_crate stolen2
}
trigger secured
{
accum 0 trigger_if_equal 1 gold_crate secured1
accum 0 trigger_if_equal 2 gold_crate secured2
}
trigger returned
{
accum 0 inc -1
accum 0 trigger_if_equal 0 gold_crate returned1
accum 0 trigger_if_equal 1 gold_crate returned2
}
trigger stolen1
{
// *----------------------------------- vo ------------------------------------------*
wm_teamvoiceannounce 0 "goldrush_axis_gold1_taken"
wm_teamvoiceannounce 1 "goldrush_allies_gold1_taken"
// *----------------------------------- vo ------------------------------------------*
}
trigger stolen2
{
// *----------------------------------- vo ------------------------------------------*
wm_teamvoiceannounce 0 "goldrush_axis_gold2_taken"
wm_teamvoiceannounce 1 "goldrush_allies_gold2_taken"
// *----------------------------------- vo ------------------------------------------*
}
trigger secured1
{
wm_announce "Allied team has secured the first Gold Crate!"
// *----------------------------------- vo ------------------------------------------*
wm_teamvoiceannounce 0 "goldrush_axis_gold1_secured"
wm_teamvoiceannounce 1 "goldrush_allies_gold1_secured"
// *---------------------------------------------------------------------------------*
}
trigger secured2
{
wm_announce "Allied team has secured the second Gold Crate!"
// *----------------------------------- vo ------------------------------------------*
wm_teamvoiceannounce 0 "goldrush_axis_gold2_secured"
wm_teamvoiceannounce 1 "goldrush_allies_gold2_secured"
wm_removeteamvoiceannounce 0 "goldrush_axis_gold_defend"
wm_removeteamvoiceannounce 1 "goldrush_allies_gold_defend"
// *---------------------------------------------------------------------------------*
}
trigger returned1
{
// *----------------------------------- vo ------------------------------------------*
wm_teamvoiceannounce 0 "goldrush_axis_gold1_returned"
wm_teamvoiceannounce 1 "goldrush_allies_gold1_returned"
// *----------------------------------- vo ------------------------------------------*
}
trigger returned2
{
// *----------------------------------- vo ------------------------------------------*
wm_teamvoiceannounce 0 "goldrush_axis_gold2_returned"
wm_teamvoiceannounce 1 "goldrush_allies_gold2_returned"
// *----------------------------------- vo ------------------------------------------*
}
}
gold_full_0
{
spawn
{
wait 500
attachtotag truck tag_obj1
faceangles 0 90 0 50
setstate gold_full_0 invisible
}
trigger show
{
setstate gold_full_0 default
}
}
gold_full_1
{
spawn
{
wait 500
attachtotag truck tag_obj2
faceangles 0 90 0 50
setstate gold_full_1 invisible
}
trigger show
{
setstate gold_full_1 default
}
}
gold_trans_0
{
spawn
{
wait 500
attachtotag truck tag_obj1
faceangles 0 90 0 50
}
trigger hide
{
setstate gold_trans_0 invisible
}
}
gold_trans_1
{
spawn
{
wait 500
attachtotag truck tag_obj2
faceangles 0 90 0 50
}
trigger hide
{
setstate gold_trans_1 invisible
}
and here the mapname.sounds file extraction for the Gold stuff:
goldrush_allies_gold_get
{
sound sound/vo/goldrush/allies/hq_goldget.wav
voice
streaming
}
goldrush_allies_gold1_taken
{
sound sound/vo/goldrush/allies/hq_gold1taken.wav
voice
streaming
}
goldrush_allies_gold1_lost
{
sound sound/vo/goldrush/allies/hq_gold1lost.wav
voice
streaming
}
goldrush_allies_gold1_returned
{
sound sound/vo/goldrush/allies/hq_gold1ret.wav
voice
streaming
}
goldrush_allies_gold1_secured
{
sound sound/vo/goldrush/allies/hq_gold1sec.wav
voice
streaming
}
goldrush_allies_gold2_taken
{
sound sound/vo/goldrush/allies/hq_gold2taken.wav
voice
streaming
}
goldrush_allies_gold2_lost
{
sound sound/vo/goldrush/allies/hq_gold2lost.wav
voice
streaming
}
goldrush_allies_gold2_returned
{
sound sound/vo/goldrush/allies/hq_gold2ret.wav
voice
streaming
}
goldrush_allies_gold2_secured
{
sound sound/vo/goldrush/allies/hq_gold2sec.wav
voice
streaming
}
Note that all other sounds Play fine, like the tankbarriers, the truck and tank stuff etc.
So gold stolen and returned sounds are played?
Add wm_announce “debug gold secured” to know if its triggered…
trigger secured
{
wm_announce "debug gold secured"
accum 0 trigger_if_equal 1 gold_crate secured1
accum 0 trigger_if_equal 2 gold_crate secured2
}
actually non of the gold-related sounds work. I get the usual ‘objective taken’ Sound but not the Gold sounds. In the console I get the error message that a Trigger has an unknown Name: Gold crate. However, neither in my map nor in GR there is a Trigger with the Name Gold_crate
and when I add the wm_announce comment in the Trigger secured I see that non of the Triggers is actually triggered.
If you look at your script… The part you posted, at the top: gold_crate
Have to be the scriptname of the Gold entity, like in Gold Rush. Or this part will never be executed.
same Problem actually related to the Gold related sounds after the bank door has been blown up. so no Sound: like get the Gold…
I might be blind but in GR I can’t find the scriptname gold_crate in the Gold entity
sorry for being such a pain
I made it. thanks so much Mateos. Interestingly, the Gold entity in GR really does have such a scriptnamer. however, when I give my one this scriptname it works.