Jump to content
Sign in to follow this  
esham

Lifted Objects Fall back to the Ground

Recommended Posts

I edited a Chernarus mission with a base for my friends dayz server. Using the 3d editor I set up the castle and made all the right adjustments. Of course converting back to 2d to merge with the original mission file we go ahead and upload it to the server. Everything works fine just that the objects I suspended from the ground are falling back down not staying levitated. My friend has no issue with this and I guess we use the exact same tactic for editing the mission. I was hoping if anyone knew what I was doing wrong. Thank you.

Share this post


Link to post
Share on other sites

Objects that support physics will always fall if left floating in the air.

You can disable their physics though,

_object enableSimulation false;

Share this post


Link to post
Share on other sites

I'm sorry, I'm not to familiar with scripting. I really wish I was and do want to learn. But where do I place this line? Does it go in my mission.sqf?

for example this is my a piece of my mission.sqf and a object (Bag of Goods) suspended from the ground.

_vehicle_13 = objNull;
if (true) then
{
 _this = createVehicle ["Land_bags_EP1", [4515.6045, 8497.7813, 3.3981621], [], 0, "CAN_COLLIDE"];
 _vehicle_13 = _this;
 _this setDir 0.48552921;
 _this setPos [4515.6045, 8497.7813, 3.3981621];
};

Does this line (_object enableSimulation false; )of code go between the curly brackets or does it go into a different file effecting all objects? I also have similar code regarding this object in the .biedi

I will go learn scripting after this. Thanks again.

Edited by esham

Share this post


Link to post
Share on other sites

Do not edit the mission.sqm - it will break the mission and it will not load unless you relly know what you are doing.

_vehicle_13 = createVehicle ["Land_bags_EP1", [4515.6045, 8497.7813, 3.3981621], [], 0, "CAN_COLLIDE"];
_vehicle_13 setDir 0.48552921; //sure just 0 would be ok here? 9 decimal places for a degree is a bit much!
_vehicle_13 setPosATL [4515.6045, 8497.7813, 3.3981621];
_vehicle_13 enableSimulation false;

That's all you need - save it as anynameulike.sqf

init.sqf:

nul = [] execVM "anynameulike.sqf";

Edited by Mattar_Tharkari

Share this post


Link to post
Share on other sites

After converting my 3d sqf to 2d sqm it changed the way my script looked. From my previous post to this (using a different object this time as a example.)

class Item143
	{
		position[]={3966.8306,359.20578,11661.803};
		azimut=-93.840271;
		id=244;
		side="EMPTY";
		vehicle="Land_A_Castle_Stairs_A";
		skill=1;
	};

Now would it be ok if I added a init field under the skill for each object I wish to suspend? For example.

class Item143
	{
		position[]={3966.8306,359.20578,11661.803};
		azimut=-93.840271;
		id=244;
		side="EMPTY";
		vehicle="Land_A_Castle_Stairs_A";
		skill=1;
           init="this enableSimulation False;";
	};

I don't have the server init file only the mission.sqm. (I would need to ask the admin for the init file) but was hopefully hoping I can do it this way instead?

Edited by esham

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  

×