Jump to content
charlis

How to Transform editor Compositions into "AttachTo" combinations

Recommended Posts

Is there a practical way to do that?

 

Something that can catch relative positions between  elements of  a composition made in the editor and then "converted" to be used with "attachTo" and "setVectorDirAndUp"?!?

 

I understand the logic of scripting, and also know relatively well, the "OFP/ARMA language"  but I really suck at combining both things (well).

 

Is not that simple, could be a potencial "very usefull" script!

 

by

 

  • Like 1

Share this post


Link to post
Share on other sites

Well how I see it those compositions get saved in some kind of fileformat right.  I haven't investigated anything but my logical programmer mind would say why don't you parse that file format ?

 

- Learn how to read that format

- Write a parser that reads the format

- Write a writer that outputs in the attachTo, setVectorDirAndUp format

 

I'm not saying this would be easy, but this would be the way to go I guess.  The data is saved in some form or another learn to read and transform it.  This does not neccesairly has to be done in SQF.  You could write a C# or Java parser in theory

Share this post


Link to post
Share on other sites

Yeah. that´s it

 

-Get relative positions and direction between elements of composition

-Save it to something like an Array

-Pass the array into a syntz similar to this:

crate2 attachTo [truck2,[0,-2.65,-.75]];
crate2 setVectorDirAndUp [[1,0,0],[0,0,1]];

-Voilá!

 

 

Problem for me is my slightly upwrds learning curve x the time I have to go further on this.   That wouldn´t be ready for Arma5 i think ;)

 

I hope that a good scripter like the idea and embrace that, at least for me that would be a very usefull tool.

 

thnx anyway

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

×