Jump to content
Sign in to follow this  
samir_dnr

Help needed -> to copy (instead of move) a groups of objects to a random pos...

Recommended Posts

Hi, sorry to bother the community!

i can make a "group" of vehicles/objects/etc MOVE to a random location, but, my mission is like "eternal", so, i need to copy the "group" instead of moving it.

I am using the SHK_moveobjects script for it.

Anyway i can copy (instead of moving) objects (4 energy transformes, 8 wired fences, 2 halogen lights, all pre-set/designed as a silo) to a random pos?

Or, use some sort of (other) script or trigger or marker for it?

Thanks!

Share this post


Link to post
Share on other sites

Thanks, bro! xD True rock n roll!!! Will test it! xD

Share this post


Link to post
Share on other sites

Kylania, just to reply... ...before everything, really thx... ...the script "objectMapper.sqf" uses the funcion setVehicleInit... ...which was disabled on Arma3 (sec. reasons...); i am tryin to fix it someway! But, thx anyway! U rock, fella!!!

Share this post


Link to post
Share on other sites

That's optional though, you could just comment out those sections and as long as you don't need init fields on your objects you'll be golden.

---------- Post added at 03:59 AM ---------- Previous post was at 03:28 AM ----------

Here's a demo mission showing this at work. Just 0-0-1 to replicate the layout at your current location. Check your RPT to see the output the mapper script made which I used for the transformerSite.sqf file.

Actually, you wanted it random, so place three markers down called "random1", "random2" and "random3" then change the trigger onAct to this:

null= ["transformerSite", 0, getMarkerPos (["random1", "random2", "random3"] call BIS_fnc_selectRandom)] execVM "objectMapper.sqf"; 

Edited by kylania

Share this post


Link to post
Share on other sites

yay, i do need to set some "this allowDamage false;" and sometimes "this allowDamage false;"

It reports err in the line 62, that is:

if (!isNil "_vehicleinit") then {_newObj setVehicleInit format ["%1;",_vehicleinit]};

If i swap it for...

if (!isNil "_vehicleinit") then {

_sCommand = format ["{(_newObj '%1') allowDamage false;}", _newObj];

[_vehicleinit,"BIS_fnc_spawn",true,true] spawn BIS_fnc_MP;

};

Is this ok? ;-)

---------- Post added at 06:05 ---------- Previous post was at 05:30 ----------

Thx Kylania! True rock n roll! xD

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×