DayZ
Base Fortifications
Myke 8 May, 2024 @ 8:54pm
Conflict with other mods.
Here is the error:
NULL pointer to instance
Class: 'Hologram'
Function: 'EvaluateCollision'
Stack trace:
BaseFortifications/scripts/4_World/fort_hologram.c:186
scripts/4_World/classes\useractionscomponent\actions\continuous\deployactions\actiondeployobject.c:59
scripts/4_World/classes\useractionscomponent\actionbase.c:753
scripts/4_World/classes\useractionscomponent\animatedactionbase.c:318
scripts/4_World/classes\useractionscomponent\actions\actioncontinuousbase.c:23


override void EvaluateCollision(ItemBase action_item = null) {
ItemBase item_in_hands = ItemBase.Cast(m_Player.GetHumanInventory().GetEntityInHands());
ItemBase fortfloor = FortCollision();

Here has to add the missing check like:
if (!item_in_hands) super.EvaluateCollision(action_item);

if (item_in_hands.IsInherited(SandbagLong_Kit))
{



Also this Method has to be changed from:

override EntityAI PlaceEntity( EntityAI entity_for_placing )
{
ItemBase item_in_hands = ItemBase.Cast( m_Player.GetHumanInventory().GetEntityInHands() );

if ( item_in_hands && item_in_hands.CanMakeGardenplot() )
{
Class.CastTo(entity_for_placing, GetGame().CreateObject( m_Projection.GetType(), m_Projection.GetPosition() ));
}

if( entity_for_placing.CanAffectPathgraph() )
{
entity_for_placing.SetAffectPathgraph( true, false );

GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, entity_for_placing);
}

return entity_for_placing;
}


to:

override EntityAI PlaceEntity( EntityAI entity_for_placing )
{
ItemBase item_in_hands = ItemBase.Cast( m_Player.GetHumanInventory().GetEntityInHands() );

if ( item_in_hands && item_in_hands.CanMakeGardenplot() )
{
Class.CastTo(entity_for_placing, GetGame().CreateObject( m_Projection.GetType(), m_Projection.GetPosition() ));
}

if( entity_for_placing.CanAffectPathgraph() )
{
entity_for_placing.SetAffectPathgraph( true, false );

GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, entity_for_placing);
}

return super.PlaceEntity(entity_for_placing);
}
Last edited by Myke; 8 May, 2024 @ 8:55pm