Problem is solved.
Do not use this script in int.c file to spawn building etc:
void SpawnObject( string type, vector position, vector orientation )
{
auto obj = GetGame().CreateObject( type, position );
obj.SetPosition( position );
obj.SetOrientation( orientation );
//Force collision update
vector roll = obj.GetOrientation();
roll [ 2 ] = roll [ 2 ] - 1;
obj.SetOrientation( roll );
roll [ 2 ] = roll [ 2 ] + 1;
obj.SetOrientation( roll );
}
in latest patch of dayz not working.
function what working correct:
modded class MissionServer
{
override void OnInit()
{
super.OnInit();
SpawnObject( "Land_Misc_Well_Pump_Blue", "4588.709961 76.555496 1820.770020", "179.999985 0.000000 0.000000" );
}
//Spawn helper function
void SpawnObject(string objectName, vector position, vector orientation)
{
Object obj;
obj = Object.Cast(GetGame().CreateObject(objectName, "0 0 0"));
obj.SetPosition(position);
obj.SetOrientation(orientation);
// Force update collisions
if (obj.CanAffectPathgraph())
{
obj.SetAffectPathgraph(true, false);
GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, obj);
}
}
}
but first made server mod (pbo) for it.
PS: also if test your building in dayzOfflineMode doesn't work. Zombies will walk through your spawned building.