Page tree
Skip to end of metadata
Go to start of metadata




Introduced in

Version:1.48

Description

Description:

Creates a complex IED.

  • "Admin"
    • No optional arguments.
  • "PressurePlate"
    • Number: Length of the plate.
    • Number: Width of the plate.
    • Number: X offset position of the plate.
    • Number: Y offset position of the plate.
    • String: Trigger weight ("Everything", "LightVehicles", or "HeavyVehicles").
  • "Radio"
    • Boolean: Can be jammed by CREW.
    • Number: Radio trigger maximum range.
  • "Cellphone"
  • "PassiveIR"
    • String: Activation type ("action", "cellphone", "wire", "radio").
    • Number: Radio activation range.
  • "Wire"
    • No optional arguments.

Code can be run when placing or picking up the IED with the VBS2 IED PLACE PICKUP SYSEH system Event Handler function.

A functional IED cannot be disabled / disarmed using a script, but must be replaced by its inert counterpart (add "_disabled" to the class name).

Syntax

Syntax:[modelType, position, triggerType, triggerOption, explosionStrength, explosionType, onExplosion] call fn_vbs_createComplexIED
Parameters:
  • modelType: String - Name of the model.
  • position: Array - The position.
  • triggerType: String - Trigger type, see description.
  • triggerOption: Array or Number - See description (optional, use -1 for default values).
  • explosionStrength: Number - Power of explosion, extra small (1) to extra large (7) (optional, use -1 for the default value (7)).
  • explosionType: String or Number - Can be: "normal" (kills or wounds), "wounding" (only wounds, even at close distances) or "fake" (only visual effects: explosion, crater and shellshock, but no damage to persons or objects) (optional, use -1 for default value ("normal")).
  • onExplosion: String or Number - Code string to execute on explosion (optional, use -1 for the default value ("")).
  • placeArmed: Boolean - Set to true, if the IED is armed when placed (optional, use -1 for the default value (false)).
  • name: String - The vehicleVarName and editor name (optional, use -1 for the default value ("")).
  • dir: Number - The direction of the object (optional, use -1 for the default value (0)).
  • disarmTime: Number - The time it takes to disarm the bomb, set to 0 to remove the action (optional, use -1 for the default value (10)).
Return Value:Object - The created IED.

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.

Examples

Examples:
_ied = ["vbs2_ied_1", [2500,2700], "admin", [], 2] call fn_vbs_createComplexIED
_ied = ["vbs2_ied_1", [2500,2700], "radio", [false, 250]] call fn_vbs_createComplexIED
// Creates a radio-triggered IED with a maximum range of 250m at position [2500,2700].

Additional Information

See also: fn vbs createIED, fn vbs artilleryStrike
Multiplayer:
Problems:

Notes








Posted on May 05, 2015
Kronzky
While the visual effect of the different IED strengths is linear (bigger blinding radius, bigger craters), the effects (deaths and injuries) are not quite:


IED Strength: 1 - Dead:  8, max range:  5m; Wounded:  0, max range:  0m
IED Strength: 2 - Dead:  8, max range:  5m; Wounded: 16, max range: 25m
IED Strength: 3 - Dead: 16, max range: 15m; Wounded:  8, max range: 25m
IED Strength: 4 - Dead: 16, max range: 15m; Wounded:  8, max range: 25m
IED Strength: 5 - Dead: 24, max range: 25m; Wounded:  0, max range:  0m
IED Strength: 6 - Dead: 24, max range: 25m; Wounded:  0, max range:  0m
IED Strength: 7 - Dead: 16, max range: 15m; Wounded:  0, max range:  0m

The tests were done by placing static units around an IED, every 10 meters between 5 and 55m, and at every 45 degrees.