Jump to content
Sign in to follow this  
Tominator

Placing objects not feature in editor (i.e. Osprey wreck, fishing boat wreck etc)

Recommended Posts

Hi,

I'm wondering how I can place wrecks at specific locations for a mission I am making

I tried going through the config viewer and only found HelicopterCrash (I am looking to get the osprey one)

This is as far as I got but neither worked:

HelicopterCrash createVehicle [0,0,0]

HelicopterCrash createVehicle player

Any help finding correct models and using the correct command to place it on the map would be extremely helpful!

Thanks!

Share this post


Link to post
Share on other sites

"Land_UWreck_MV22_F" createVehicle (getMarkerPos "wrkPos");

You need a className in "" and a valid position eg the marker above named wrkPos. [0,0,0] is a valid position but it's at the bottom left of the map. Players position would be (position player) or (getPosATL player).

Land_UWreck_FishingBoat_F

Land_UWreck_MV22_F

Land_Wreck_BRDM2_F

Land_Wreck_Car2_F

Land_Wreck_Car3_F

Land_Wreck_Car_F

Land_Wreck_Commanche_F

Land_Wreck_Offroad2_F

Land_Wreck_Offroad_F

Land_Wreck_Traw2_F

Land_Wreck_Traw_F

Land_Wreck_Truck_dropside_F

Land_Wreck_Truck_F

Share this post


Link to post
Share on other sites

Thank you.

On another subject, where did you found these classnames ?

Share this post


Link to post
Share on other sites

Another option that even allows you to adjust the object's position within the editor is:

1. Create some random object in the editor and give it a distinctive name (such as "REPLACEME").

2. Save the mission.

3. Locate the mission's directory and open mission.sqm with a text editor.

4. Search for the placeholder vehicle you just placed (using its distinctive name).

5. Once you find it, replace whatever is in vehicle="blabla" with your chosen class => vehicle="Land_Wreck_Car_F"

Share this post


Link to post
Share on other sites
Thank you.

On another subject, where did you found these classnames ?

I use this: http://www.ofpec.com/forum/index.php?topic=35236.0

with this for cfgVehicles:

[configFile >> "CfgVehicles"] call compile preprocessFileLineNumbers "dumpConfig.sqf"

replace CfgVehicles with anything that starts with Cfg in the main game config and it will give you a list for those items. eg CfgActions, CfgMagazines, CfgMusic etc. There are other reference lists but I prefer to create my own:

http://browser.six-projects.net/

or there is the config viewer in the game itself which in theory should give you the classnames you need, with a bit of head scratching.

Edited by Mattar_Tharkari

Share this post


Link to post
Share on other sites
"Land_UWreck_MV22_F" createVehicle (getMarkerPos "wrkPos");

You need a className in "" and a valid position eg the marker above named wrkPos. [0,0,0] is a valid position but it's at the bottom left of the map. Players position would be (position player) or (getPosATL player).

Sounds simple enough to me! I'll try this out when I get home.

Thanks to everyone who helped. You got to learn somehow!

Edit: Here's the script I used. I couldn't get it to work in the init field for some reason if someone could explain that!

//Save in notepad, name ospreySpawn.sqf and save in Arma 3 directory
//Place unit and type this in init field: nul = [this] execVM "ospreySpawn.sqf";
//wrkPos is marker placed down in the editor. It is the sixth tab down, above modules.
// Name it whatever you want, just make sure you change the name inside the quotes

"Land_UWreck_MV22_F" createVehicle (getMarkerPos "wrkPos");

Edit Edit: How would lay down a specific point? I tried the below and did not work:

"Land_UWreck_MV22_F" createVehicle (1765,5872,5.4);

Edited by Tominator

Share this post


Link to post
Share on other sites

Thanks guys, learning new stuff from every post. I also tried it using BIS_fnc_spawnVehicle function in trigger and it works that way too.

[getmarkerpos "crash", 0, "Land_Wreck_Commanche_F", east] call BIS_fnc_spawnVehicle;

PS: Modified the code from another source. I`m not sure what 0 and east stands for. crash is the marker name you need to create.

Share this post


Link to post
Share on other sites

Edit Edit: How would lay down a specific point? I tried the below and did not work:

"Land_UWreck_MV22_F" createVehicle (1765,5872,5.4);

Needs to be an array.

So:

"Land_UWreck_MV22_F" createVehicle [1765,5872,5.4];

Thanks guys, learning new stuff from every post. I also tried it using BIS_fnc_spawnVehicle function in trigger and it works that way too.

[getmarkerpos "crash", 0, "Land_Wreck_Commanche_F", east] call BIS_fnc_spawnVehicle;

PS: Modified the code from another source. I`m not sure what 0 and east stands for. crash is the marker name you need to create.

You can see here:

http://community.bistudio.com/wiki/BIS_fnc_spawnVehicle

Share this post


Link to post
Share on other sites
Needs to be an array.

Thanks Cuel!!!

Not directed to you, I am trying to attach something to the Osprey...

It spawns the Osprey, but not the MH9

Any insight?

//Use nul = [this] execVM "ospreySpawn.sqf";

osprey = "Land_UWreck_MV22_F" createVehicle [1754,5846,0];
heli1 = "B_MH9_F" createVehicle [getMarkerPos "heliPos"];
heli1 attachto [osprey,[0,0,0]];

I tried this next but got "missing ;"

Spawned a MH9 and put this in init field while running the ospreySpawn.sqf:

heli1 attachto [osprey,[0,0,0]];

Edited by Tominator
Edited

Share this post


Link to post
Share on other sites

Now you're using an array for the getMarkerPos, but it returns an array. So you'll get a double array :p

osprey = "Land_UWreck_MV22_F" createVehicle [1754,5846,0];
heli1 = "B_MH9_F" createVehicle (getMarkerPos "heliPos");
// might have to sleep a little first
sleep 0.1;
heli1 attachto [osprey,[0,0,0]];

Share this post


Link to post
Share on other sites
Edit: Here's the script I used. I couldn't get it to work in the init field for some reason if someone could explain that!

You need a handle on it to work in an init:

handle = "Land_UWreck_MV22_F" createVehicle (getMarkerPos "wrkPos");

Share this post


Link to post
Share on other sites
Now you're using an array for the getMarkerPos, but it returns an array. So you'll get a double array :p

osprey = "Land_UWreck_MV22_F" createVehicle [1754,5846,0];
heli1 = "B_MH9_F" createVehicle (getMarkerPos "heliPos");
// might have to sleep a little first
sleep 0.1;
heli1 attachto [osprey,[0,0,0]];

Thanks for the third time but the helicopter spawns about 25 meters away. Here's a picture:

6E6D83T.jpg

I copy and pasted what you put and left the nul part. Any ideas? Could it be one of those objects that can't have things attached to it?

//Use nul = [this] execVM "ospreySpawn.sqf";

osprey = "Land_UWreck_MV22_F" createVehicle [1754,5846,0];
heli1 = "B_MH9_F" createVehicle (getMarkerPos "heliPos");
// might have to sleep a little first
sleep 0.1;
heli1 attachto [osprey,[0,0,0]];

Actually didn't get it. Trying with different vehicles now. Hmm..

---------- Post added at 20:08 ---------- Previous post was at 20:08 ----------

Actually didn't get it. Trying with different vehicles now. Hmm..

Tried in init field again, still says 'missing ;'

Maybe that is the reason it's not attaching?

Edited by Tominator
Added script

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  

×