Difference between revisions of "VN ms fnc preventDestruction"

From Savage Game Design Wiki
Jump to navigation Jump to search
m (1 revision imported)
(Page filling)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
 
{{Function
 
{{Function
  
 
|v= 1.00
 
|v= 1.00
  
|a= Wyqer, veteran29
+
|author= Wyqer, veteran29
 +
 
 +
|a= local
  
|e=
+
|e= global
  
 
|g1= general
 
|g1= general
  
|d= <pre>/*
+
|d= Adds event handler preventing destruction of the vehicle. Works only if vehicle is local to the executing machine.
    File: fn_preventVehicleDestruction.sqf
+
Eventhandler id is stored in the object under "vn_preventDamageEh" variable name.
    Author: Wyqer, veteran29
 
    Date: 2020-07-24
 
    Last Update: 2020-07-24
 
    Public: Yes
 
 
 
    Description:
 
        Adds event handler preventing destruction of the vehicle. Works only if vehicle is local to executing machine.
 
        Id of the EH is stored in vn_preventDamageEh variable on the object.
 
 
 
    Parameter(s):
 
        _object - Object to prevent destruction of [OBJECT, defaults to objNull]
 
 
 
    Returns:
 
        HandleDamage EH ID [NUMBER]
 
 
 
    Example(s):
 
        [this] call vn_ms_fnc_preventDestruction
 
*/
 
 
 
#define WHEEL_SELECTIONS ["hitlfwheel", "hitrfwheel", "hitlf2wheel", "hitrf2wheel", "hitlmwheel", "hitrmwheel", "hitlbwheel", "hitrbwheel"]
 
 
 
</pre><small>''(Placeholder description extracted from the function header by '''LM_exportFunctionsToWiki.sqf''')''</small>
 
  
|s= [] call [[vn_ms_fnc_preventDestruction]];
+
|s= [obj] call [[VN_ms_fnc_preventDestruction]]
  
|p1n=
+
|p1n= obj
|p1t=
+
|p1t= object
|p1d=
+
|p1d= object to make non-fully-destructible
 
|p1v=
 
|p1v=
  
Line 47: Line 26:
 
|p2v=
 
|p2v=
  
|r1t=
+
|r1t= number
|r1d=
+
|r1d= HandleDamage event handler id
  
|x1= <code>-</code>
+
|x1= <code>[sogJeep] call [[VN_ms_fnc_preventDestruction]];</code>
 
}}
 
}}

Latest revision as of 21:58, 25 February 2021

← back to Functions Introduced in S.O.G. Prairie Fire v1.00
by Wyqer, veteran29
Argument(s): local
Effect(s): global

Description

Adds event handler preventing destruction of the vehicle. Works only if vehicle is local to the executing machine. Eventhandler id is stored in the object under "vn_preventDamageEh" variable name.

Syntax

Syntax
[obj] call VN_ms_fnc_preventDestruction
Parameters
obj: Object - object to make non-fully-destructible
Return value
Number - HandleDamage event handler id

Examples

Example 1
[sogJeep] call VN_ms_fnc_preventDestruction;