DayZCommunityOfflineMode icon indicating copy to clipboard operation
DayZCommunityOfflineMode copied to clipboard

Infected pass through buildings

Open AquilusZero opened this issue 4 years ago • 10 comments

I am trying in every way not to let the infected pass between the walls that I have placed but without any success, here is what I have entered:

#include "$CurrentDir:\mpmissions\Expansion.ChernarusPlus\Base\BaseGorka.c" #include "$CurrentDir:\mpmissions\Expansion.ChernarusPlus\Base\BaseTulga.c" #include "$CurrentDir:\mpmissions\Expansion.ChernarusPlus\Base\RadiationDutch_2021.c"

#include "$CurrentDir:\mpmissions\Expansion.chernarusplus\eAI\AI_init.c"

/---------------------------------------------------------------------------------------------------------------------
| MAIN | ---------------------------------------------------------------------------------------------------------------------
/

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); obj.Update();

// Force update collisions
if (obj.CanAffectPathgraph())
{
    obj.SetAffectPathgraph(true, false);
    GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, obj);
}

} /*

  • Spawn type helper function */ void SpawnObjectType( string type, vector position, vector orientation ) { auto obj = GetGame().CreateObject( type, position ); obj.SetPosition( position ); obj.SetOrientation( orientation ); obj.SetOrientation( obj.GetOrientation() ); //Collision fix obj.Update(); obj.SetAffectPathgraph( true, false ); if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj ); }

void main()

{ //Base loads BaseGorka(); BaseTulga(); RadiationDutch_2021();

Thanks for your help!

AquilusZero avatar Dec 25 '21 15:12 AquilusZero

Its the problem with the initializing with the hive. I also tried to force update the collision ingame by executing the code again for the item i was looking at. No success. Then i played araound with the hive executing it outside the mission or something like that. Calling it later, then suddenly it worked.

i also saw that the collision atomatically initialized after around 20-30 minutes after serverstart.

try to play around with that. Hook me up if you need code snippets. Will provide them later then

S4MT3K avatar Dec 25 '21 15:12 S4MT3K

@S4MT3K

Hello! Please, pass me the code, I'll try to do as you suggest. Thank you!

AquilusZero avatar Dec 25 '21 15:12 AquilusZero

@S4MT3K Also, forgive my lack of knowledge, I don't understand what you mean by booting outside the mission file, it would be great if you explain this to me! Thank you!

AquilusZero avatar Dec 25 '21 16:12 AquilusZero

In 2-3 days man. Im on holidays.

S4MT3K avatar Dec 25 '21 16:12 S4MT3K

Of course, thank you for your help! Thank you so much!

AquilusZero avatar Dec 25 '21 16:12 AquilusZero

Search the CEHive() function. Ctrl+x it and create a new file. Include it and execute it.

S4MT3K avatar Dec 25 '21 16:12 S4MT3K

I did this

#include "$CurrentDir:\mpmissions\Expansion.ChernarusPlus\CEHive\CEHive.c" #include "$CurrentDir:\mpmissions\Expansion.ChernarusPlus\Base\BaseGorka.c" #include "$CurrentDir:\mpmissions\Expansion.ChernarusPlus\Base\BaseTulga.c" #include "$CurrentDir:\mpmissions\Expansion.ChernarusPlus\Base\RadiationDutch_2021.c"

#include "$CurrentDir:\mpmissions\Expansion.chernarusplus\eAI\AI_init.c"

/---------------------------------------------------------------------------------------------------------------------
| MAIN | ---------------------------------------------------------------------------------------------------------------------
/

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); obj.Update();

// Force update collisions
if (obj.CanAffectPathgraph())
{
    obj.SetAffectPathgraph(true, false);
    GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, obj);
}

} /*

  • Spawn type helper function */ void SpawnObjectType( string type, vector position, vector orientation ) { auto obj = GetGame().CreateObject( type, position ); obj.SetPosition( position ); obj.SetOrientation( orientation ); obj.SetOrientation( obj.GetOrientation() ); //Collision fix obj.Update(); obj.SetAffectPathgraph( true, false ); if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj ); }

void main()

{ //Base loads CEHive(); BaseGorka(); BaseTulga(); RadiationDutch_2021();

--------------------------------------------------------------------

In the .c file I did this:

void CEHive()

{ //INIT ECONOMY-------------------------------------- Hive ce = CreateHive(); if ( ce ) ce.InitOffline(); };

It's correct?

AquilusZero avatar Dec 25 '21 16:12 AquilusZero

No. You have to refer. I see you really have no acknowledgment. Let me get what n my scripts after holiday and i get you a working snippet.

S4MT3K avatar Dec 25 '21 16:12 S4MT3K

Thank you so much!

AquilusZero avatar Dec 25 '21 17:12 AquilusZero

@S4MT3K Thank you so much for your support, I've set everything up as per the guide you suggested. It did the same thing to me that happened to you, but I teleported myself and the server had just started, I fired many shots to get them and they passed the walls but after a few tens of minutes they didn't go back to shoot! I think it's a great result! thank you so much, if you have other notions or advice please tell me!

AquilusZero avatar Dec 26 '21 00:12 AquilusZero