Does the issue occur in the editor or during gameplay?
During Gameplay.
If it's a gameplay issue, please specify which movement system and camera type you're using (free movement vs. grid movement, third-person vs. first-person) grid movement
Briefly describe the issue you're experiencing:
trying to get music to change depending on things that happen in game in my case if the player steals and enters the village map a random number gets picked if the % hits the guard gets triggered 1st with a message and after that message
the music meant to fade out for 5seconds and the new music is meant to fade in at 6 seconds but what it dose is instantly cut the music off and the new music plays it don't fade in or out
Are there any errors in the in-game debug console or external console window?
I'm not sure but here
Provide the steps necessary to reproduce the issue:
here my script below
if player.inventory contains "ITEM_0034" then
if random(1, 10) > 5 then
display_message("there's someone prowling around here", entity["guard 1"]);
stop_music(5);
play_music("koa-tense-0.ogg", 10);
global.property["villagemusic"] = "koa-tense-0.ogg";
set_movement_speed(entity["guard 1"], 35);
entity["guard 1"].behavior = "get player village";
end;
elseif player.inventory contains "ITEM_0033" then
if random(1, 10) > 5 then
display_message("there's someone prowling around here", entity["guard 1"]);
stop_music(5);
play_music("koa-tense-0.ogg", 10);
global.property["villagemusic"] = "koa-tense-0.ogg";
set_movement_speed(entity["guard 1"], 35);
entity["guard 1"].behavior = "get player village";
end;
end;
show_widget("village area tag (test)", 10);
wait(15);
hide_widget("village area tag (test)", 10);
if global.property["guard village defeted"] == true then
remove_entity(entity["guard 1"]);
wait(300);
add_character("city guard 1", "guard house 1", "guard 1");
set_global_property("guard village defeted", false);
end;