Difference between revisions of "VN ms fnc preventDestruction"

From Savage Game Design Wiki
Jump to navigation Jump to search
m (Text replacement - "]]; |p1n=" to "]] |p1n=")
(Page filling)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Category:TODO]]
 
 
{{Function
 
{{Function
  
Line 6: Line 5:
 
|author= Wyqer, veteran29
 
|author= Wyqer, veteran29
  
|a=
+
|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:
+
|s= [obj] call [[VN_ms_fnc_preventDestruction]]
        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):
+
|p1n= obj
        _object - Object to prevent destruction of [OBJECT, defaults to objNull]
+
|p1t= object
 
+
|p1d= object to make non-fully-destructible
    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]]
 
 
 
|p1n=
 
|p1t=
 
|p1d=
 
 
|p1v=
 
|p1v=
  
Line 49: 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;