Advertisement
Brenner650

fnc_build.sqf

Sep 15th, 2021
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. private["_build_style","_object_list","_debug_local"];
  2. _build_style = _this select 0;
  3. _object_list = _this select 1;
  4. if(isNil("_build_style"))then{_build_style = "default"};
  5. if(_build_style == "default")then{
  6. {
  7. private ["_obj"];
  8. _obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
  9. if (_x select 4) then {
  10. _obj setDir (_x select 2);
  11. _obj setPos (_x select 1);
  12. } else {
  13. _obj setPosATL (_x select 1);
  14. _obj setVectorDirAndUp (_x select 3);
  15. };
  16. } foreach _object_list;
  17. }else{
  18. if(_build_style == "v1")then{
  19. {
  20. private ["_obj"];
  21. _obj = createVehicle [_x select 0, [0,0,0], [], 0, "NONE"];
  22. if (_x select 4) then {
  23. _obj setDir (_x select 2);
  24. _obj setPos (_x select 1);
  25. } else {
  26. _obj setPosATL (_x select 1);
  27. _obj setVectorDirAndUp (_x select 3);
  28. };
  29. } foreach _objs;
  30. }else{
  31. if(_build_style == "v2")then{
  32. {
  33. private ["_obj"];
  34. _obj = createVehicle [_x select 0, (_x select 1), [], 0, "CAN_COLLIDE"];
  35.  
  36. if (_x select 4) then {
  37. _obj setDir (_x select 2);
  38. _obj setPos (_x select 1);
  39. } else {
  40.  
  41. _obj setVectorDirAndUp (_x select 3);
  42. _obj setPosATL (_x select 1);
  43. };
  44.  
  45. } foreach _objs;
  46. };
  47. };
  48. };
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement