Jump to content

Recommended Posts

Hi,
I have a gun store as well as a vehicle store that were made in VR so that everything is flat which I plan to use on other terrains. It will be created via code, etc... The problem is, the compositions are very complex (in terms of how they are made) and they use vectors and all that. The BIS composition functions does this but it doesn't take these things (vector, etc) into account. The only thing I can think of is to create some function that copies position, simulation, vectors, etc. Or modify the BIS composition functions? I am looking for advice and ideas for the best approach.
This is the vehicle store (you'll see what I mean by complex)
https://imgur.com/a/RLV7I

Here are some images from gun store that will give you an idea of what the issue is:

https://imgur.com/a/ZLbvF

  • Like 1

Share this post


Link to post
Share on other sites

*edit* - NVM, wasn't thinking clearly about the question.

Share this post


Link to post
Share on other sites

Last reply... Was busy and kinda forgot about it. Though I will still need to figure this out eventually. I tried Eden Composition Spawning by @Larrow - no joy. Maybe my base composition is just too complex? :down:

Share this post


Link to post
Share on other sites

@avibird 1 - Ah. Got you. You mentioned vehicle/gun script which confused me ha. :grinning:

  • Haha 1

Share this post


Link to post
Share on other sites

Bump. I still need help with this. Any ideas?

Share this post


Link to post
Share on other sites

I've been using this  Eden Composition Spawning for the last couple of days and it seems to working quite well mixed in with a random spawn script i use.

 

Did you save the composition with a name then copy it into your mission folder? 

Did you add the name of your composition into the composition.cfg file that came with  Eden Composition Spawning?

 

ill copy one of mine here.

composition.cfg

 

LARs_spawnComp_debug = 1;

 

class CfgCompositions

{

        class Ant { #include "ant.sqe" };

        class Mort_1 { #include "Mort_1.sqe" };

        class Bandit_Camp_1 { #include "Bandit_Camp_1.sqe" };

        class Civilian_Camp_1 { #include "Civilian_Camp_1.sqe" };

};

 

I also removed all of his compositions and addActions. Then i used this code in sqf to spawn it

 

Civilian_Camp_1.sqf

 

pos = [] call BIS_fnc_randomPos;

 

_Civilian_Camp_1 = "Land_HelipadEmpty_F" createVehicle pos;

_randPos = _Civilian_Camp_1 getRelPos [0,0];

["Civilian_Camp_1", _randPos, [0,0,0], random 360, true] call LARs_fnc_spawnComp;

 

_marker = createMarker ["Civilian_Camp_1",getPos _Civilian_Camp_1];

_marker setMarkerType "mil_dot"; _marker setMarkerSize [1,1];

_marker setMarkerColor "ColorBlack";

_marker setMarkerText "Civilian Camp 1";

 

Added 

execVM "Scripts\RndComps\Civilian_Camp_1.sqf";

into my initServer.sqf to spawn it.

 

The Eden Composition Spawning will only work on a server. It will not work in singleplayer.

I only make mission for myself to play and make them mp for respawning. I just set them to 1 player.

 

My Civ Camp is a shanty town with alot in it. How are you doing it? maybe you have missed something

Share this post


Link to post
Share on other sites

@Chuc - I tried it already. Setup wasn't the issue. It works but for the two complex compositions I have, not so well. See pics in first post. There is a lot of detail and vectors, and what not. It spawned it but a lot of out of place stuff and also unlevel, etc...

Share this post


Link to post
Share on other sites

This is my own, was originally for decorating houses but worked well with a lot of objs with diff dir/vectors/objs on tables etc

Edited a bit for you to use but only uses simple objects so some checks might be needed for more advanced use.

This is basically what you describe in your first post without the check for sim.

I know all the worldpos and attaching detaching looks weird but I tested a lot. Building in VR and then spawning on diff terrains at diff elevations and such

This is the only way I could get it to work every time but maybe you can figure something I couldn't.
Can't test the edit right now so hopefully no stupid syntax errors.

  Reveal hidden contents

 

Edited by soolie
  • Like 1

Share this post


Link to post
Share on other sites

@soolie - Thank you! I'll test it now and get back to you.

Share this post


Link to post
Share on other sites

was re-reading and missed something - copyToClipboard str _houses;  _houses should be _comps now
copyToClipboard str _comps; 

Sorry!

  • Like 1

Share this post


Link to post
Share on other sites

Hehe. No worries. That was the first thing I saw and changed. Few errors in the spawning part. I can work with this. Needed to re-write the spawning part anyway. Thank you! @soolie

Not tested on other terrains yet. Will let you know how that goes when I do the spawning part.

  • Like 1

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

×