Jump to content
Sign in to follow this  
SOLDIER X

SetVectorUp & Compositions

Recommended Posts

Hi all

Is it possible to use the SetVectorUp command on created compositions on uneven ground.

Im trying to create a series of small camps and bunkers using some of the in game compositons. But the terrain i want them on isnt exactly level.

eg.

if (isserver) then {nul = [getpos this, getdir this,"bunkerMedium03"] execvm "CA\modules\DynO\data\scripts\objectMapper.sqf"}; 

this setVectorUp [0, 0, 1] works a treat if i manually place objects in the editor. But im stuck on how to add it to compositions

Anyone tell me the correct syntax to use or if this is even possible.

Thanks X

:)

Share this post


Link to post
Share on other sites

Take a look @ This Thread. I was wondering how I could reference an object from a spawned composition. It's quite easy, you should be able to get an idea anyhow of how you would go about it.

Share this post


Link to post
Share on other sites

Thanks that handy for future reference.

Not sure how it helps with setting the vector for a spawned composition though. My scripting skills are pretty basic.

I tried with Mr Murrays editor placed composition addon and was unable to set the vector on these also

Is it possible to level a composition ? Anyone acheived this ?

Kind regards

X

Share this post


Link to post
Share on other sites

This is also something that I would like to be able to do as it really puts limits on where you can spawn them :-)

Share this post


Link to post
Share on other sites

well, you would have to reference all of the objects individually and then setvector each one. Unless I'm missing something about how setVector works. Anyhow, maybe someone knows a quicker way to do it

---------- Post added at 11:38 ---------- Previous post was at 11:36 ----------

or maybe you could use nearestObjects in a trigger list somehow and then setVector foreach object in the list. So basically you'd have a trigger area over the composition

Share this post


Link to post
Share on other sites

There are a few ways you can level a composition but I don't think it will help.

if (isserver) then {nul = [getpos this, getdir this,"bunkerMedium03"] execvm "CA\modules\DynO\data\scripts\objectMapper.sqf"};

objs = nearestobjects [getpos this,["building"],100] ;{_x setvectorup [0,0,1] } foreach objs

or

if (isserver) then {Objs = [getPos this, getdir this, "bunkerMedium03"] call (compile (preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf"));{_x setvectorup [0,0,1] } foreach objs };

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  

×