Jump to content
shuko

SHK_moveObjects

Recommended Posts

I don't know if there are that many people who will find this useful, but if it helps even just one, it's worth sharing. With this script you can quite easily move multiple objects from A to B without the objects loosing relative positions to each other. That's all it does, basically saves you from doing all the "setpos select 0 + 1.7" stuff.

Moves set of objects from A to B, retaining the direction and distance from
a point of reference.

Parameters:
0: Object or Position Anchor, point of origin.
1: Object or Position Center position to which objects are move around.
2: Number Range in meters to search for objects.
3: Array or String Optional. Type of objects to search for.
4: Number or Object Optional. Direction adjustment. Affects position of objects, not the dir they will be facing.
5: Number or Object Optional. Direction the objects will be facing after they are moved.

Examples:
nul = [gl1,gl2,50] execvm "shk_moveobjects.sqf"
nul = [start,destination,100,"Man"] execvm "shk_moveobjects.sqf"
nul = [[3243,5234,0],gl2,50,["Man","Car"]] execvm "shk_moveobjects.sqf"
nul = [gl1,gl2,50,[],gl2] execvm "shk_moveobjects.sqf"
nul = [gl1,gl2,50,[],45] execvm "shk_moveobjects.sqf"
nul = [gl1,gl2,50,[],45,270] execvm "shk_moveobjects.sqf"


SHK_moveObjects.sqf

SHK_moveObjects.Stratis.zip

Using parameters 4 and 5

https://www.youtube.com/watch?v=WWQyGZuF4O0

Arma 2 thread Edited by shuko

Share this post


Link to post
Share on other sites
Guest

Release frontpaged on the Armaholic homepage.

===================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Hellz yeah!

When the example mission was posted in the A2 thread, it instantly became of my most used scripts.

Gotta love the randomness. Thanks guys!

Share this post


Link to post
Share on other sites

Used this a lot in ARMA 2 for randomizing mission objective locations (e.g. find a destroy the OPFOR AA emplacement/ammo dump/whatever, with associated foot patrols, camo nets, MG bunkers, etc). A great way to allow a mission design to be reused multiple times, and even keep it 'unknown' for the mission designer.

Excellent work Shuko.

Share this post


Link to post
Share on other sites

Great work Shuko, your script was exactly what I was needing. I did have a problem at first because I was using markers instead of Game Logic objects. The sample mission helped me understand what was needed though. Works like a charm now.

Thank you!!!

Share this post


Link to post
Share on other sites

This is very cool.

Is there a way to move markers and triggers?

EDIT**

It does move triggers, oops. But what about markers, players and modules?

Edited by Jinker

Share this post


Link to post
Share on other sites

Basically anything that is type of "object", which markers unfortunately are not.

Share this post


Link to post
Share on other sites

Thanks for the reply, I was able to use setMarkerPos after the script fires so it's all good.

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

×