Jump to content
NFG WhatHiMean

Help with spawning compositions script

Recommended Posts

With the above screenshot, can you just go simple and try this:

_compReference  =["ArtyMission", "arty_spawn_marker"] call LARs_fnc_spawnComp;

 

Share this post


Link to post
Share on other sites
2 minutes ago, panther42 said:

With the above screenshot, can you just go simple and try this:

_compReference  =["ArtyMission", "arty_spawn_marker"] call LARs_fnc_spawnComp;

 

Same error 😕

Spoiler

image.png?ex=65528d6a&is=6540186a&hm=4ea

 

Share this post


Link to post
Share on other sites

something does not seem correct with your mission folder setup or scripts.

Any chance to post screenshots of folder structure with files or upload the mission?

Share this post


Link to post
Share on other sites
7 minutes ago, NFG WhatHiMean said:

Same error 😕

  Hide contents

image.png?ex=65528d6a&is=6540186a&hm=4ea

 

After removing this, && { getMarkerPos _compPos != [0,0,0] } from larrows script which looks like it checks if the position is valid and not at 0,0,0 it seems to be working

Share this post


Link to post
Share on other sites

Ok, I tested on a sample composition mission I had, and it would not just take the marker name.  I got the same error.  I had to enter like this:

private _compReference = [ "XoXanhVCPOWCamp", getMarkerPos "marker_0"] call LARs_fnc_spawnComp;

Share this post


Link to post
Share on other sites
11 minutes ago, panther42 said:

something does not seem correct with your mission folder setup or scripts.

Any chance to post screenshots of folder structure with files or upload the mission?

The file structure is how larrows said in their post, it appears I got it working by removing a snippet of not completely necessary code. The code looks like it checks that the position is valid and not at [0, 0, 0] so as long as the markers are correct and/or  I manually check to make sure they spawn right, it should be fine. I'll just have to keep in mind that bit of error checking is no longer in there and I have to manually do it. That's fine by me I just want this to work so I can move on in my mission making lol

Share this post


Link to post
Share on other sites

you can put his code back and just adjust your call to:

_compReference = ["ArtyMission", getMarkerPos _artmarker] call LARs_fnc_spawnComp;

Share this post


Link to post
Share on other sites

Nothing can ever be easy, after we fixed the first pos error, now it's a direction error

Spoiler

image.png?ex=6552a616&is=65403116&hm=b60

 

Share this post


Link to post
Share on other sites

For whatever reason, the engine does NOT like:

( _compPos isEqualType "" && { getMarkerPos _compPos != [0,0,0] } )

paired in the same line and spits out the error code:

Spoiler

Error in expression <EqualType "" && { getMarkerPos _compPos != [0,0,0] } ) : {
if ( _compRot isEqual>
Error position: <!= [0,0,0] } ) : {
if ( _compRot isEqual>
Error !=: Type Array, expected Number,Bool,String,Namespace,Not a Number,Object,Side,Group,Text,Config entry,Display (dialog),Control,Network Object,Team member,Task,Diary record,Location

 

deleted incorrect posting here... failed to recognize my own coding

 

I would say odd behavior, and stick to just entering _compReference = ["ArtyMission", getMarkerPos _artmarker] call LARs_fnc_spawnComp;

 

3 hours ago, NFG WhatHiMean said:

Nothing can ever be easy, after we fixed the first pos error, now it's a direction error

  Reveal hidden contents

image.png?ex=6552a616&is=65403116&hm=b60

 

Did you change any of the _compReference paramaters for the LARs call?

 

If you want to use the marker rotation to set the rotation of your composition, you'll have to just edit fn_getCompPosition:

( _compPos isEqualType "" && { getMarkerPos _compPos != [0,0,0] } ) to be only ( _compPos isEqualType ""  )

 

You can now use just _artmarker and remember to edit your call to LARS_fnc_spawnComp:

_compReference = ["ArtyMission", _artmarker, [0,0,0], true] call LARs_fnc_spawnComp;

Edited by panther42

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

×