ringoray 1 Posted May 8, 2015 Hey guys, I have created a base using the objectgrabber method. Question is, how would I attach a script to these spawned helos/units/objects? For instance, I want to attach a re-spawn script to the helicopters spawned in at the mission start. Thanks in advance for any help given. Share this post Link to post Share on other sites
jshock 513 Posted May 8, 2015 Well, how is the respawn script used/called in the first place? BIS_fnc_objectsMapper returns all the spawned objects, so you would need to do something like: _objects = [/*objectsGrabber info*/] call BIS_fnc_objectsMapper; {[_x] execVM "respawnScript.sqf";} forEach _objects; Share this post Link to post Share on other sites
ringoray 1 Posted May 8, 2015 JShock said: Well, how is the respawn script used/called in the first place?BIS_fnc_objectsMapper returns all the spawned objects, so you would need to do something like: _objects = [/*objectsGrabber info*/] call BIS_fnc_objectsMapper; {[_x] execVM "respawnScript.sqf";} forEach _objects; like this in vehicle init 0 = [this,5] execVM "vehicle_respawn.sqf" Share this post Link to post Share on other sites
jshock 513 Posted May 8, 2015 Take that and replace: [_x] execVM "respawnScript.sqf"; With yours (replacing "this" with "_x"): 0 = [_x,5] execVM "vehicle_respawn.sqf"; Keep in mind, this will be applied to all your objects (fortifications, vehicles, etc.), so if you want to limit it to certain things, such as only vehicles, you will need to check the object before applying the script. Share this post Link to post Share on other sites
ringoray 1 Posted May 8, 2015 Ok cheers dude. Thank you. Share this post Link to post Share on other sites