Modding Tools > Lucas' Simpsons Hit & Run Mod Launcher > Hacks > Mod Requirable Hacks > Additional Script Functionality > MFK Commands > Conditions > SetCondSound

SetCondSound

Set a sound to use for a hitpeds condition or the insidetrigger / outsidetrigger conditions.

Context

This command should be called between calls to AddCondition and CloseCondition.

Syntax

hitpeds Condition

SetCondSound( sound );

Game.SetCondSound( sound )

  • sound: The name of the daSoundResourceData to play.

insidetrigger / outsidetrigger Conditions

SetCondSound( sound, event, [time_between, start_delay] );

Game.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" events.
  • start_delay: The delay before the sound starts playing after entering/exiting the trigger in seconds
    • Only for "inside_trigger" or "outside_trigger" events.

Examples

hitpeds Condition

AddCondition("hitpeds");
	AddObjSound("generic_car_explode");
CloseCondition();

Game.AddCondition("hitpeds")
	Game.AddObjSound("generic_car_explode")
Game.CloseCondition()

insidetrigger / outsidetrigger Conditions

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

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

Game.AddCondition("insidetrigger")
	Game.SetCondTrigger("z2phone1")

	Game.SetCondSound("enter_trigger","gag_alm2")
	Game.SetCondSound("inside_trigger","countdown_beeps",1,5)
	Game.SetCondSound("exit_trigger","P_HitByC_Mrg_01")
Game.CloseCondition()

Notes

No additional notes.

Version History

1.18

Added this command.

Donut Team © 2020 · v4.0