GMS_RC/@GMS/addons/GMS/Compiles/Missions/fn_spawnSimpleObjects.sqf

24 lines
700 B
Plaintext
Raw Normal View History

2023-09-23 14:05:31 +00:00
/*
GMS_fnc_spawnSimpleObjects
by Ghostrider [GRG]
Copyright 2016
--------------------------
License
--------------------------
All the code and information provided here is provided under an Attribution Non-Commercial ShareAlike 4.0 Commons License.
http://creativecommons.org/licenses/by-nc-sa/4.0/
*/
#include "\GMS\Compiles\Init\GMS_defines.hpp"
params["_center","_objects","_relative"];
private _spawnedObjects = [];
{
2023-10-21 11:42:13 +00:00
_x params["_className","_relPos","_dir"];
2023-09-23 14:05:31 +00:00
private _objPos = _center vectorAdd _relPos;
private _obj = createSimpleObject [_className,ATLToASL _objPos];
2023-10-21 11:42:13 +00:00
[_obj, _dir] call GMSCore_fnc_setDirUp;
2023-09-23 14:05:31 +00:00
_spawnedObjects pushBack _obj;
} forEach _objects;
_spawnedObjects