Jump to content
Sign in to follow this  
xsdmx

Dynamic Object Compositions and 2D Editor

Recommended Posts

Hey all, sorry if my question has an obvious answer, but I was wondering - how do I get the various awesome templates into the regular editor for use in missions? I'd love to have a couple bases setup.

Share this post


Link to post
Share on other sites

//Spawns the object composition defined by class name "FuelDump1_US" on position _pos on a random angle.
private ["_newObjs"];
_newObjs = [_pos, random 360, "FuelDump1_US"] call (compile (preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf"));

//Spawns a random composition from the library matching tags "usmc" and "medium" on position _pos on a random angle.
_newObjs = [_pos, (random 360), ["usmc", "medium"]] call (compile (preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf"));

More info forthcoming in the BiKi :)

Share this post


Link to post
Share on other sites

Is _pos the position of a marker or game logic or what? Also, do I just put this in a script and call it in the init.sqf?

Share this post


Link to post
Share on other sites

Guess what ? _pos is a position, nothing more nothing less. Just a bunch of coordinates in an array.

And those commands do not have to be in a script, execute them whereever you like. They themselve call a script.

Share this post


Link to post
Share on other sites

Is it possible to modify the templates? (without using a mod, that is). Or at least get the reference to one of the component objects in the template so it can be manipulated?

Edit: That random option is freakin' awesome, btw

Share this post


Link to post
Share on other sites

Can someone please post an example mission using this feature? I can't figure it out.

Share this post


Link to post
Share on other sites

try this:

go to the editor,

place an invisible H,

in the init line write:

_newObjs = [getPos this, random 360, "FuelDump1_US"] call (compile (preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf"));

this will create a US fuel Dump on the invisible H location.

Edit: maybe the invisible H isn't the best idea, but you get the point (can use a game logic or an empty marker instead).

Edited by noamles

Share this post


Link to post
Share on other sites

@noamles

Thank you very much! That worked perfectly. I was having a hard time getting the position part of it setup correctly. What an awesome feature.

Thanks Again!

Monty

Share this post


Link to post
Share on other sites

here you go:

airplane_park_ru1
airplane_park_us1
anti-air_ru1
anti-air_us1
bunkerMedium01
bunkerMedium02
bunkerMedium03
bunkerMedium04
bunkerSmall01
camp_ins1
camp_ins2
camp_ru1
camp_ru2
camp_us1
camp_us2
camp_us3
checkpoint1_us
citybase01
cityBase02
cityBase03
cityBase04
firebase_ru1
firebase_us1
firing_range_targets1
firing_range_targets10
firing_range_targets11
firing_range_targets2
firing_range_targets3
firing_range_targets4
firing_range_targets5
firing_range_targets6
firing_range_targets7
firing_range_targets8
firing_range_targets9
firing_range_targets_water1
firing_range_targets_water2
firing_range_targets_wreck1
firing_range_targets_wreck2
firing_range_targets_wreck3
firing_range_targets_wreck4
firing_range_targets_wreck5
firing_range_targets_wreck6
firing_range_targets_wreck7
fuelDepot_us
fuel_dump_ru1
fuel_dump_us1
guardpost2_us
guardpost3_us
guardpost_cdf
guardpost_us
heli_park_ru1
heli_park_us1
mediumtentcamp2_ru
mediumtentcamp3_ru
MediumTentCamp_napa
mediumtentcamp_ru
radar_site_ru1
radar_site_us1
smallbase
smallmgnest_us
SmallTentCamp2_napa
SmallTentCamp_napa
tankDitch2_cdf
tankDitch_cdf
vehicleShelter_cdf
vehicleShelter_us
vehicle_park_ru1
vehicle_park_us1
weapon_store_ru1
weapon_store_us1

Share this post


Link to post
Share on other sites
try this:

go to the editor,

place an invisible H,

in the init line write:

_newObjs = [getPos this, random 360, "FuelDump1_US"] call (compile (preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf"));

this will create a US fuel Dump on the invisible H location.

Edit: maybe the invisible H isn't the best idea, but you get the point (can use a game logic or an empty marker instead).

... Thanks, but you are talking about ArmA2 here?

Share this post


Link to post
Share on other sites

that line "random 360" does it mean it spawns it random direction everytime? And if so - is it just to remove it to get it in the direction icon is pointing set by you?

Dont have ARMA2 so i cant try. Just want to learn before i get it. ;)

Alex

Share this post


Link to post
Share on other sites
72;1315539']that line "random 360" does it mean it spawns it random direction everytime? And if so - is it just to remove it to get it in the direction icon is pointing set by you?

Since it's a numeric parameter I'm guessing you'd replace "random 360" with the number representing the direction you want it to face.

Share this post


Link to post
Share on other sites

One perhaps handy method: create a marker test with some position and direction, then instead of _pos and random 360, use: markerPos "test" and markerDir "test" :)

Share this post


Link to post
Share on other sites

DnA:

How would i write that out? Example:

_newObjs = [GetMarkerPos test, MarkerDir test, "tankDitch2_cdf"]...

?

Sorry but im learning. :) Awesome stuff though. Cant wait til tomorrow!

Alex

Share this post


Link to post
Share on other sites
Here's a link that shows pictures of all of them.

http://www.armatechsquad.com/ArmA2Class/Objects/compositions/

Well now I'm really horny :yay::yay:

Do you know how many hours I've spend in ArmA I placing camps? :eek: BIS, I could kiss you for this feature! :D It'll save many many hours that I can spend into developing my missions now instead of designing them from scratch all over again.

Share this post


Link to post
Share on other sites
Well now I'm really horny :yay::yay:

Do you know how many hours I've spend in ArmA I placing camps? :eek: BIS, I could kiss you for this feature! :D It'll save many many hours that I can spend into developing my missions now instead of designing them from scratch all over again.

I agree; those compositions are sexy. I spent hours myself trying to assemble some detailed and realistic camps and outposts in my missions, and everything I came up with is pretty much blown out of the water by those.

Share this post


Link to post
Share on other sites

Wow this is a fantastic feature. But one question, is there a way to make units spawn with it, i.e. spawn guys in the defensive positions like bunkers, etc?

Share this post


Link to post
Share on other sites

That is a concern of mine as well... seems like you'd have to position them using manual x/y/z coordinates based on where you know the composition is going to spawn... :confused:

Share this post


Link to post
Share on other sites
That is a concern of mine as well... seems like you'd have to position them using manual x/y/z coordinates based on where you know the composition is going to spawn... :confused:

That's what I was thinking as well but it would get even harder if you used the second bit:

//Spawns a random composition from the library matching tags "usmc" and "medium" on position _pos on a random angle.
_newObjs = [_pos, (random 360), ["usmc", "medium"]] call (compile (preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf"));

If you use this one, it's hard to even know what objects you get.

Share this post


Link to post
Share on other sites

Good point. I had pretty much planned on not relying on specific troop positions around the compositions, but rather just designate them as a patrol zone for the UPS script or something.

Share this post


Link to post
Share on other sites

Instead of going through all of this, why in the world didn't they simply make these things objects in the editor to place down?

Share this post


Link to post
Share on other sites
That is a concern of mine as well... seems like you'd have to position them using manual x/y/z coordinates based on where you know the composition is going to spawn... :confused:

Not really ... I'm setting those camps up via game logic. Additional units could be spawned around this game logic using it as a relative position. Maybe there's an additional parameter to including some soldiers, I don't know.

Instead of going through all of this, why in the world didn't they simply make these things objects in the editor to place down?

Because it's not possible. In the editor you can place only single objects, not object compositions.

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  

×