MFK Command: SetCondSound

Synopsis

Set a sound for the condition.

For use inside hitpeds,  insidetrigger and outsidetrigger conditions.

Syntax

"hitpeds" Condition

SetCondSound( <sound> );
  • sound: The name of the daSoundResourceData to play.

"insidetrigger" / "outsidetrigger" Conditions

SetCondSound( <sound>, <event>, [<time_between>, <start_delay>] );
  • sound: The name of the daSoundResourceData to play.
  • event: The event to play the sound on.
    • enter_trigger: Play the sound when entering the trigger.
    • inside_trigger: Play the sound when inside the trigger (only for "insidetrigger" conditions).
    • outside_trigger: Play the sound when outside the trigger (only for "outsidetrigger" conditions).
    • exit_trigger: Play the sound when exiting the trigger.
  • time_between: The time between each time the sound plays in second (only for "inside_trigger" or "outside_trigger" event).
  • start_delay: The delay before the sound starts playing after entering/exiting the trigger in seconds (only for "inside_trigger" or "outside_trigger" event).

Examples

SelectMission("m1");
	...
    
    AddStage();
		...

        AddCondition("hitpeds");
        	SetCondSound("generic_car_explode");
        CloseCondition();
    CloseStage();
CloseMission();
SelectMission("m1");
	...
    
    AddStage();  
		...

        AddCondition("insidetrigger");
        	SetCondTrigger("z2phone1");

        	SetCondSound("enter_trigger","gag_alm2");
        	SetCondSound("inside_trigger","countdown_beeps",1,5);
        	SetCondSound("exit_trigger","P_HitByC_Mrg_01");
        CloseCondition();
    CloseStage();
CloseMission();

Notes

No additional notes.

History

1.18

  • Added this command.
Back to top