Modding Tools > Lucas' Simpsons Hit & Run Mod Launcher > Hacks > Mod Requirable Hacks > Additional Script Functionality > CON Commands > SetConditionalParameter

SetConditionalParameter

Set parameters on a car depending on various conditions.

Syntax

drawableVisibility Parameter

SetConditionalParameter("drawableVisibility", vehicle_drawable_name, condition, [condition_value1, ...]);

Game.SetConditionalParameter("drawableVisibility", vehicle_drawable_name, condition, [condition_value1, ...])

  • "drawableVisibility": This type of parameter sets the visibility of a drawable on the car if the condition is true.
  • vehicle_drawable_name: The name of the drawable on the vehicle to show/hide.
  • condition: The condition that determines if the prop is visible.
    • vehicleHealth: A condition that depends on the health of the vehicle.
      • This condition requires 2 more arguments specifying the minimum health and the maximum health for the condition to be true.
    • level: A condition that depends on the level the player is currently in.
      • This condition requires an argument specifying the level that the condition will return true in.

hasdoors Parameter

SetConditionalParameter("hasdoors", condition, [condition_value1, ...]);

Game.SetConditionalParameter("hasdoors", condition, [condition_value1, ...])

  • "hasdoors": This type of parameter controls whether or not the car has doors if the condition is true.
  • condition: See the "drawableVisibility" section.

highroof Parameter

SetConditionalParameter("highroof", condition, [condition_value1, ...]);

Game.SetConditionalParameter("highroof", condition, [condition_value1, ...])

  • "highroof": This type of parameter controls whether or not the car has a high roof if the condition is true.
  • condition: See the "drawableVisibility" section.

Examples

SetConditionalParameter("drawableVisibility", "clfamilyRoof", "vehicleHealth", 0.5, 3.0); 
SetConditionalParameter("drawableVisibility", "clfamilyFood", "level", 1); 

SetConditionalParameter("hasDoors", "vehicleHealth", 1.5, 3.0);

SetConditionalParameter("highRoof", "vehicleHealth", 0.0, 0.5);

Game.SetConditionalParameter("drawableVisibility", "clfamilyRoof", "vehicleHealth", 0.5, 3.0)
Game.SetConditionalParameter("drawableVisibility", "clfamilyFood", "level", 1)

Game.SetConditionalParameter("hasDoors", "vehicleHealth", 1.5, 3.0)

Game.SetConditionalParameter("highRoof", "vehicleHealth", 0.0, 0.5)

Notes

No additional notes.

History

1.18

Added this command.

Donut Team © 2023 · v4.0