Hi,
i have a music-player that can be build an be destroyed by opposit team.
the object of my map is that to steal smth. and to bring it somewhere, then to build up the player, to keep it build(defend against attackers) and while it is build it shall play a song. The objective is to hear the song till the end. The song shall stop when the player is broken and it shall start again at the point it stopped when its built again. My problem is that i am not that good in scripting. My script wont work and I dont know why.
allied_gold // <------------- objective
{
{
spawn
{
wait 200
}
trigger stolen
{
setstate target1 invisible
setstate allied_gold_toi2 invisible
wm_announce "Allies have taken the Axis gold!"
}
trigger returned
{
wm_announce "Axis have returned the Allied gold!"
setstate target1 default
setstate allied_gold_toi2 default
}
trigger captured
{
wm_announce "The Allies have secured the Axis gold"
setstate target2 invisible
wait 2000
trigger vinyl_player setup
}
}
vinyl_player // <------------- func_constructible
{
spawn
{
wait 200
constructible_class 2
constructible_chargebarreq 0.75
setstate real_vinyl_player invisible
setstate player_baumaterial invisible
setstate vinyl_player invisible
}
trigger setup
{
setstate real_vinyl_player invisible
setstate player_baumaterial default
setstate vinyl_player invisible
}
buildstart final
{
setstate real_vinyl_player underconstruction
setstate player_baumaterial default
setstate vinyl_player invisible
}
built final
{
setstate real_vinyl_player default
setstate player_baumaterial invisible
setstate vinyl_player default
wm_announce "The Vinyl-Player is built!"
trigger music_player start
}
decayed final
{
setstate real_vinyl_player invisible
setstate player_baumaterial default
setstate vinyl_player invisible
}
death
{
setstate real_vinyl_player invisible
setstate player_baumaterial default
setstate vinyl_player invisible
wm_announce "Allies have destoyed the Vinyl-Player" /
trigger music_player stop
}
}
music_player // <------------- script_mover
{
spawn
{
wait 200
accum 0 set 0 // enabled?
accum 1 set 200 //counter
wm_announce "funktioniert"
}
trigger start
{
accum 0 set 1
trigger music_player count_down
trigger music_player play_music
wm_announce "funktioniert auch"
}
trigger stop
{
accum 0 set 0
trigger music_player stop_music
}
trigger count_down
{
accum 0 abort_if_not_equal 1
accum 1 inc -1
wait 1000
//accum 1 trigger_if_equal 1 music_player set_winner
trigger music_player count_down
}
trigger play_music
{
accum 0 abort_if_not_equal 1
playsound sound/alchemytest/flywithme.wav volume 300
wm_announce "funktioniert3"
}
trigger stop_music
{
accum 0 abort_if_not_equal 0
//stopsound
}
trigger set_winner
{
wm_setwinner 0
wait 2000
wm_endround
}
}
I can bring the obj to the place it shoul be brought and then i can build up the player, but then nothing happens. I cant trigger any parts of the “music_player” the spawn-part sends me the wm_announce but not more.
I tried a lot but always my ET crashed or it just didnt work.
Can someone take a look on it, or even tell me how you would do it …

gl.