Sign in to follow this  
Followers 0
WURSTKETTE

howto createSimpleObject

15 posts in this topic

Hey,

since hours i'm lookin for a way to place arma assets as decorative items, without players beeing able to pickup guns/backpacks or use weaponcrates, so far without any success.

Now i'm lookin into createSimpleObject, but first of all i have no clue of the real usage and yet there is no option in eden for createSimpleObject besides no export function for that.

Has anybody had their fingers on it and might explain on a simple example how to use/place/export/manually set it?

 

Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement

Posted (edited)

hey WolfkillArcadia,

thanks for the reply.

 

Still stuck with this, prolly should look something like this:

 

private _objects = [
	["/path/to/model.p3b",[2010.43,11816.1,20.14],[[0,1,0],[0,0,1]]
];
{
	private _object = (_x select 0) createSimpleObject [0,0,0];
	_object setPosATL (_x select 1);
	_object setVectorDirAndUp (_x select 2);
} forEach _objects;

 

Since i'm pretty new into this, i have no clue how the get the path of the model returned in the editor - i  saw there is command getModelInfo but i have no clue how to use that command in the editor return me the path.

 

Yeh know it's pretty newbish, maybe you could give me an advice how to get started here?

 

Thanks in advance

Edited by WURSTKETTE

Share this post


Link to post
Share on other sites
13 minutes ago, WURSTKETTE said:

maybe you could give me an advice how to get started here?

Thanks in advance

private _objects = 
[
	["/pathtomodel",[2010.43,11816.1,20.14],[[0,1,0],[0,0,1]]
];

{
	private _object = createSimpleObject [(_x select 0),[0,0,0]];
	_object setPosATL (_x select 1);
	_object setVectorDirAndUp (_x select 2);
} forEach _objects;

It would be something like that. createSimpleObject [PATH,POSITION];

You can either get a list of p3d paths here: https://community.bistudio.com/wiki/createSimpleObject/objects

Or you can manually get the p3d by running: 

_model = getModelInfo cursorObject;
copyToClipboard str(_model);

In the debug console. You can access the debug console in the editor while in game, by pressing esc. But before that, cursorObject requires you to be looking at an object for it to work. So look at an object that you want the model info from and then press esc. Paste the above two lines of code into the the debug console that appears next to your esc menu and press the button that says "local". This will run whatever is in the debug console locally, which in turn, copies the model information to your clipboard. I think you can figure out the rest from there. 

Share this post


Link to post
Share on other sites

Posted (edited)

while you where posting this i figured out i could see it while in splendidcam, bottom left - thanks for the coptytocliboard, this helps a lot!

when placing a lynx at the ground i get that path:

["dummyweapon_single.p3d","a3\weapons_f\dummyweapon_single.p3d",false]

 

i doub't that's the right one, what's the problem it shows me a dummyweapon?

 

appreciate your help here pal, thanks a lot!

 

Edited by WURSTKETTE

Share this post


Link to post
Share on other sites

Posted (edited)

ok, no clue why it doesn't work for weapons, it did work at least for the crates i'm lookin for - just need to figure out how it has to be formated for the mission.

 

private _objects = 
[
	["a3\weapons_f\ammoboxes\wpnsbox_f.p3d",[2010.43,11816.1,20.14],[[0,0.999826,-0.0186628],[-0.0080009,0.0186622,0.999794]]
];

{
	private _object = createSimpleObject [(_x select 0),[0,0,0]];
	_object setPosATL (_x select 1);
	_object setVectorDirAndUp (_x select 2);
} forEach _objects;
Edited by WURSTKETTE

Share this post


Link to post
Share on other sites

Because the Lynx on the ground isn't a Lynx. It's a weaponHolder in a sense. 

What you posted above should work for a mission.

Share this post


Link to post
Share on other sites

Use killzones kid method, its great and very easy.

_heli = "B_Heli_Light_01_F" createVehicleLocal (player getRelPos [10, 0]);
_position = getPosWorld _heli;
_vectorDirUp = [vectorDir _heli, vectorUp _heli];
_model = getModelInfo _heli select 1;
deleteVehicle _heli;
_simpleHeli = createSimpleObject [_model, _position];
_simpleHeli setVectorDirAndUp _vectorDirUp;

Creates the actual vehicle then gets model info, deletes the original and the simple object takes its place perfectly in position

1 person likes this

Share this post


Link to post
Share on other sites

Posted (edited)

5 hours ago, WolfkillArcadia said:

What you posted above should work for a mission.

actually want it for a trader but should be work also, i hope - need to give it a try.

 

4 hours ago, John said:

Use killzones kid method, its great and very easy.


_heli = "B_Heli_Light_01_F" createVehicleLocal (player getRelPos [10, 0]);
_position = getPosWorld _heli;
_vectorDirUp = [vectorDir _heli, vectorUp _heli];
_model = getModelInfo _heli select 1;
deleteVehicle _heli;
_simpleHeli = createSimpleObject [_model, _position];
_simpleHeli setVectorDirAndUp _vectorDirUp;

Creates the actual vehicle then gets model info, deletes the original and the simple object takes its place perfectly in position

actually, i started with that - when puttin into debug it placed me the vehicle (object) but in the editor i couldn't select the object nor i saw it in export sqf output, couldn't find pos and so on -  prolly doing it the wrong way but as stated i just jumped into this and tryin to figure things out.


i prolly mix up lotta things right now, damn

5 hours ago, WolfkillArcadia said:

Because the Lynx on the ground isn't a Lynx. It's a weaponHolder in a sense. 

eh that's what i thought about but -  how to get modelpath out of placed weapons then? (is there any way).

For "groundholders" i could set setdamage 1 as workaround but, in long term that's not was i'm lookin for - not sure what to do :|

 

Please don't get me wrong, not lookin for someone mastice that for me - feel free to link me to some *default starting whut ever*, so i can learn the basics, i'm defo into it - just lookin for some "pre-sets" i could learn from.

 

 

 

Thanks in advance

 

 

Edited by WURSTKETTE

Share this post


Link to post
Share on other sites

im guessing you know about this ? 

very handy, unless you want something completely different, in that case don't read this... at this point though its too late, so just keep reading but forget about what you read... ¬¬

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.