Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
I never thought that much about the performance... Thanks for reminding me!
nice mod! I would like to contribute by suggesting some more code optimization:
Since you're using CBA, you can filter out unwanted classes from your XEH. Moreover, I would switch to a "initPost" XEH in the case there are other "HandleDamage" kind EHs applied somewhere (because only the last one returns the damage to apply).
This should work and prevent parachutes to show your custom effects. Please note that the form "addEventHandler ["type", {call myFunction}]" is faster than "addEventHandler ["type", {all my code here}]" and that I assume you implemented functions as suggested above (an alternative could be building your mod by following a CBA template so that your functions would be compiled at their manner).
Going on, when you set your "state" variable you should make its value public by setting the third parameter of setVariable as true (or again with CBA by using CBA_fnc_setVarNet). At the moment you set the variable where the aircraft is local and if there is a pilot change your variable would not exist for the new pilot causing the aircraft to potentially take more damage than the set treshold!
Lastly, you should set a default value when you use getVariable (private _state = _unit getVariable ["FSCL_state", 0];) and you should NOT remoteExec call or spawn since they could be blocked by battleye filters. Instead remoteExec a function (remoteExec is already scheduled when calling for functions, so suspension is allowed as for spawn).
Please consider adding your mod to github even if small in code amount :)
thank you!
'x\fscl\addons\main\functions\script_component.hpp' not found.
I fixed it by copying the script_component.hpp file into the functions folder. However I still receive an error about a misisng file called "XEH_preStart.sqf"