jumppack_effects.sqf 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #include "\a3\editor_f\Data\Scripts\dikCodes.h"
  2. #include "../../config_macros.hpp"
  3. macro_grp_fnc_name(jumppack,effect_jt_21) = {
  4. params["_unit","_effect_position_list"];
  5. {
  6. _effect_position_data=_x;
  7. _mem_point=_effect_position_data select 0;
  8. _offset=_effect_position_data select 1;
  9. _blueFireEffect = "#particlesource" createVehicle (getPosASL _unit);
  10. _blueFireEffect setParticleClass MACRO_QUOTE(macro_new_cloudlet(jumppack_fire_blue));
  11. _blueSparkEffect = "#particlesource" createVehicle (getPosASL _unit);
  12. _blueSparkEffect setParticleClass MACRO_QUOTE(macro_new_cloudlet(jumppack_spark));
  13. _smokeTrailEffect = "#particlesource" createVehicle (getPosASL _unit);
  14. _smokeTrailEffect setParticleClass MACRO_QUOTE(macro_new_cloudlet(jumppack_smoke));
  15. _THEBLUELIGHT = "#lightpoint" createVehicle (getPosASL _unit);
  16. _THEBLUELIGHT setLightAmbient [0, 0, 0];
  17. _THEBLUELIGHT setLightColor [.15, 0.45, 1];
  18. _THEBLUELIGHT setLightBrightness 1;
  19. //_THELIGHT setLightColor [1, 0.45, 0.15];
  20. //_THELIGHT setLightBrightness 1;
  21. _THEBLUELIGHT attachto [_unit, _offset,_mem_point];
  22. _smokeTrailEffect attachTo [_unit, _offset,_mem_point];
  23. _blueSparkEffect attachTo [_unit, _offset,_mem_point];
  24. _blueFireEffect attachTo [_unit, _offset,_mem_point]; //[0, -.3, -.1]
  25. _attached_items=_unit getVariable ["RD501_jumppack_effects",[]];
  26. _attached_items pushBack _THEBLUELIGHT;
  27. _attached_items pushBack _smokeTrailEffect;
  28. _attached_items pushBack _blueSparkEffect;
  29. _attached_items pushBack _blueFireEffect;
  30. _unit setVariable ["RD501_jumppack_effects",_attached_items,true];
  31. } forEach _effect_position_list;
  32. sleep 1;
  33. _unit call macro_grp_fnc_name(jumppack,remove_effects);
  34. };
  35. macro_grp_fnc_name(jumppack,add_landing_effects) = {
  36. params[
  37. ["_unit",player,[player]]
  38. ];
  39. _pulse_nade= MACRO_QUOTE(macro_new_ammo(jumppack_blue_pulse)) createVehicle (getPos player);//namenai_test_pulse_smok
  40. _pulse_nade setDamage 1;
  41. _volume=3;
  42. _dist=30;
  43. _unit_backpack_class=backpack _unit;
  44. _sound_path_landing=selectRandom([(configFile >> "CfgVehicles" >> _unit_backpack_class),"RD501_jumppack_sound_land",[]] call BIS_fnc_returnConfigEntry);
  45. playSound3D [_sound_path_landing, _unit,false, getPosASL _unit,_volume,1,_dist];
  46. };
  47. macro_grp_fnc_name(jumppack,no_effect) = {
  48. params["_unit","_effect_position_list"];
  49. };