The-Smallest
First time out of the vault
Hi guys... I have got a problem with SFX adding. These are parts of my script:
procedure doSequence begin
if (sequence == 1) then begin
game_ui_disable;
sequence += 1;
add_timer_event(self_obj, game_ticks(10), TIMER_SEQUENCE);
... there is a part of script which is not important...
end else if (sequence == 8) then begin
sound:= sfx_build_char_name(dude_obj, ANIM_fall_front, snd_knock_down);
reg_anim_clear(dude_obj);
reg_anim_begin();
reg_anim_animate(dude_obj, ANIM_fall_front, -1);
reg_anim_play_sfx(dude_obj, sound, 0); // This works...
reg_anim_end();
sequence += 1;
add_timer_event(self_obj, game_ticks(2), TIMER_SEQUENCE);
end else if (sequence == 9) then begin
sound1 := sfx_build_weapon_name(snd_weapon_attack, obj_carrying_pid_obj(maggot, PID_10MM_PISTOL), hit_left_weapon_primary, self_obj);
reg_anim_clear(maggot);
reg_anim_begin();
reg_anim_animate(maggot, ANIM_fire_single, -1);
reg_anim_play_sfx(maggot, sound1, 0); // This does not work...
reg_anim_end();
sequence += 1;
add_timer_event(self_obj, game_ticks(4), TIMER_SEQUENCE);
end
end
maggot is a gangster. FSE compiles this without problems. But in the game, there is no sound.
Can someone help me?
procedure doSequence begin
if (sequence == 1) then begin
game_ui_disable;
sequence += 1;
add_timer_event(self_obj, game_ticks(10), TIMER_SEQUENCE);
... there is a part of script which is not important...
end else if (sequence == 8) then begin
sound:= sfx_build_char_name(dude_obj, ANIM_fall_front, snd_knock_down);
reg_anim_clear(dude_obj);
reg_anim_begin();
reg_anim_animate(dude_obj, ANIM_fall_front, -1);
reg_anim_play_sfx(dude_obj, sound, 0); // This works...
reg_anim_end();
sequence += 1;
add_timer_event(self_obj, game_ticks(2), TIMER_SEQUENCE);
end else if (sequence == 9) then begin
sound1 := sfx_build_weapon_name(snd_weapon_attack, obj_carrying_pid_obj(maggot, PID_10MM_PISTOL), hit_left_weapon_primary, self_obj);
reg_anim_clear(maggot);
reg_anim_begin();
reg_anim_animate(maggot, ANIM_fire_single, -1);
reg_anim_play_sfx(maggot, sound1, 0); // This does not work...
reg_anim_end();
sequence += 1;
add_timer_event(self_obj, game_ticks(4), TIMER_SEQUENCE);
end
end
maggot is a gangster. FSE compiles this without problems. But in the game, there is no sound.
Can someone help me?