Jump to content
Jack Silvin

Custom Building problem

Recommended Posts

Hello, I have custom model of building, I making "Geometry", "RoadWay", "View Geometry", "Fire Geometry", but zombie walk through walls etc, I making like another my work and was fine, but now old my buildings works like this new, zombie start walk through building, how to fix it? or what I miss?

Thx for your help.

Share this post


Link to post
Share on other sites

Hello again, I do some test with vanilla building from dayz game.

1. unpack house pbo (House_1W01.p3d)

2. I do not unbinarise, using binarised file.

3. I create own config.cfg and mode.cfg and put it from dayz in my mod

4. I pack in pbo

after it I test it and have the same problem zombie walk and run through this building like no geometry and else.

Also you can test it by self: https://fex.net/s/tky3mpt

archive with test, just make pbo by Addon Builder.

So I understand have some parameter for building in p3d file (or else thing), but no any info about it....

Share this post


Link to post
Share on other sites

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.

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

×