Jump to content
Sign in to follow this  
avibird 1

Why Can't I spawn objects on the LHD using these codes help!

Recommended Posts

I have been using  these two code since arma2 to spawn non editor game objects into my missions. They still work for ARMA3 on all other surfaces in the game but not on the LHD's   

myBuilding = " " createVehicle position this; deleteVehicle this;
 bld=" " createvehiclelocal (getposasl this);bld setdir (getdir this);

I know I have to put one of these codes to adjust the height of the LDH

this setPos [(getPos this) select 0, (getPos this) select 1, 16.5];

this setpos [position this select 0, position this select 1, 16]

Is there a new code that I need to use for this to get objects to spawn. I have no issues to set the height of editor objects using the above.

 

Share this post


Link to post
Share on other sites

We are using:

_this setPos (|o (the lhd)| modelToWorld [0,0,14]);

'`(numbers by your self)

Share this post


Link to post
Share on other sites

@ t.a.6 you are using that code for the height of objects. My second group of codes work fine for the height for any object that is in the editor. The issue when I attempt to spawn non editor objects that are in the game with my first group of codes I can't get it to spawn on the LHD. It only spawns on the bottom of the ocean floor. How do i adjust the these codes to spawn non editor objects with elevated heights then just ground leve.

myBuilding = " " createVehicle position this; deleteVehicle this;

bld=" " createvehiclelocal (getposasl this);bld setdir (getdir this);

Share this post


Link to post
Share on other sites

 

The command is not only height, point is - what the command letting you place object according to |the ship|any object|'s |center| (counting the the object's turn degree).

I guies you'll have to to create and move the objects.

 

Share this post


Link to post
Share on other sites

@ t.a.6 your code block does not work giving errors in the editor.

 

@ gc8  setPosASL works but so does the setPos that is not the issue.

 

 

I am using these codes to spawn non editor objects

 

 

myBuilding = " " createVehicle position this; deleteVehicle this; 

bld = " " createvehiclelocal (getposasl this); bld setdir (getdir this);

if I put the other codes with them

 

 

this setPos [(getPos this) select 0, (getPos this) select 1, 16.5];

 

this setpos [position this select 0, position this select 1, 16]

 

even if I add setPosASL it still spawns objects at ground level.

 

 

There must be a way to add height of objects within the spawn code to have the objects spawn in at a set height.  The two codes do not work together for some reason.

Share this post


Link to post
Share on other sites
_lo = createVehicle [|cno|,getpos |o|,[],0,"none"]; _lo setPos (|o| modelToWorld [0,0,14]);

Working perfect, ``and no way to spawn something on some height '(with the command), `"createvehicle" using algorithm to find empty place `(on ground `(not: where it can stand)).

Share this post


Link to post
Share on other sites

@ t.a.6   what are you spawning into the game world with your code (ie object or unit) and How are you calling it via SQF or Object init/game logic ect.

Please give me an example. I am not following you.

 

Yes you can spawn objects at different heights using this two code blocks.

 

 

this setPos [(getPos this) select 0, (getPos this) select 1, 16.5]; 

this setpos [position this select 0, position this select 1, 16]

 

My issues is I can't spawn the non editor objects to different heights using these codes.

 

myBuilding = " " createVehicle position this; deleteVehicle this; myBuilding = " " createVehicle position this; deleteVehicle this; bld=" " createvehiclelocal (getposasl this);bld setdir (getdir this);

I am trying add ladders to the LHD like I did with ARMA2.

 

 

There must be a way to combine this two code blocks to work  together to get what I need.

 

 

bld = " " createvehiclelocal (getposasl this);bld setdir (getdir this); this setPos [(getPos this) select 0, (getPos this) select 1, 16.5];

 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

 AVIBIRD 1, on 12 Feb 2016 - 05:37, said:

```Write `'lower' please.

Locally on computer, or on server.

Give me |the thing you want to spawn|'s classname.

Share this post


Link to post
Share on other sites

I don't know how LOL. please make my day and Spawn this at various heights on the LDH. Land_pierLadder_F. This object is not in the vanilla editor.

I don't think you fully understand what I am asking. Normally most vanilla editor objects you can use spawn in using the two codes I stated above. You just put the code in the init via editor and adjust the height you need them to spawn off the ground.

There are many game objects that are not in the editor. But you can still spawn them in using the other two codes I stated. But for whatever reason you can't spawn non editor items off the ground using the code blocks.

I am trying to merge ladders to together to allow players to board the LHD from the water and have access to other parts of the LHD. I have done this in ARMA2 using the codes. Things are not the same in arma3 for what reason and I am not smart enough to understand why the codes did not work or how to adjust them to get them to work in arma3.

So try to spawn the ladder using your code block at different elevations off of sea level or ground level. I would love to see how you can do this.

Now I stated I am not smart enough to understand all of this but I have a good work ethic and will work hard to find solutions to get what I need to complete my mission design.

I did find a way to spawn the Land_pierLadder_F and merge them together to make one big ladder to allow players to have full access to the LHD and board from the water level. Using the height codes and CJTF101's EDITOR (MOD) which puts most of the other in game non editor objects into the editor so the codes will work now.

I would really want to know why the spawn codes does not work on theses non editor objects and how I could do this without a MOD.

So please show me your example of your code working for the ladder :) make my day. I hope I ```wrote `'lower' for you sir!!!

Share this post


Link to post
Share on other sites

working on 100% 

_o = createVehicle ["Land_pierLadder_F",|p (any position)|,[],0,"none"];
_o setPos (|o (the ship's name)| modelToWorld [0,0,14]);

Share this post


Link to post
Share on other sites

How are you calling the code into the game by SQF, object init, game logic ect. How are you adjusting the position on the LHD for use.

Share this post


Link to post
Share on other sites

How are you calling the code into the game by SQF, object init, game logic ect. How are you adjusting the position on the LHD for use.

create .sqf file, but actually it doesn't matter.

Share this post


Link to post
Share on other sites

OK so you are using a SQF to call your code! That's what I figured.  

How the hell are you positioning the ladders at the exact location on the LHD's?

How are you merging two ladders together in that code block? 

What are you using to call the LHD into the game @CUP, @atlas_LHD, @cho_LHD  @Nimitz

 

I don't think you have done what I am asking for with your code block above. Maybe you have spawned a ladder on the surface of the LHD but it's not functional or allows the player to have access to the water or higher levels of the ship.

 

If you have please give an example mission of it. Avibird.

Share this post


Link to post
Share on other sites

OK so you are using a SQF to call your code! That's what I figured.  

How the hell are you positioning the ladders at the exact location on the LHD's?

How are you merging two ladders together in that code block? 

What are you using to call the LHD into the game @CUP, @atlas_LHD, @cho_LHD  @Nimitz

 

I don't think you have done what I am asking for with your code block above. Maybe you have spawned a ladder on the surface of the LHD but it's not functional or allows the player to have access to the water or higher levels of the ship.

 

If you have please give an example mission of it. Avibird.

[0,0,14] - change the values to place the object where you want to.

Share this post


Link to post
Share on other sites

You never answered my questions!!!

1. How are you positioning the ladders at the exact location on the LHD's?

2. How are you merging two ladders together in that code block?

3. What are you using to call the LHD into the game @CUP, @atlas_LHD, @cho_LHD @Nimitz

Have you attempted this yes or no! have you put two ladders together from the water level to deck level that allows you to board the LHD from the water.

I can get this done as I stated above but need to use the mod editor. Have you done this the way you are saying. yes or no. I do appreciate the replies but I have my doubts this could be done your way due to the scaling model of the LHD is somewhat off.

Share this post


Link to post
Share on other sites

1. ```How did you?
Just self, with zeus and debug console.

2. 

_lo |co| createvehiclelocal (getpos _this); _lo setPos (_this modelToWorld [0,0,0]); _lo setdir (getdir _this);

?
3. What ever??? 

Share this post


Link to post
Share on other sites

Lol I am done with you. You have no clue really do you.

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  

×