AI Air Patrols

After having a look at why the helicopter disappears if shot it would seem it has something to do with the FSM to start with and the server_pushobj and Server_updateobjects. Those are the two bits of code that are effecting players getting into the choppers.
 
I honestly don't comprehend what I've done wrong.
Did you change the spawn in location? It looks like that's a celle mission.


Also, edit these files in your dayz_server.pbo - but bewhere, this is the nuclear option and shouldn't be used long term. I'm looking for a more elegant fix (that sarge has suggested, but I haven't demoed yet).


server_cleanup.fsm
Code:
//Check for hackers
 {
//if(vehicle _x != _x) then {
//if  (!(vehicle _x in _safety) && ((typeOf vehicle _x) != "ParachuteWest")) then {
//diag_log ("CLEANUP: KILLING A HACKER " + (name _x) + " " + str(_x) + " IN " + (typeOf vehicle _x));
//(vehicle _x) setDamage 1;
//_x setDamage 1;
//};
//};
 } forEach allUnits;

server_objectupdate.sqf
Code:
if (!_parachuteWest) then {
if (_objectID == "0" && _uid == "0") then {
_object_position = getPosATL _object;
//    diag_log format ["DEBUG: Deleting object %1 with invalid ID at [%2,%3,%4]", typeOf _object, _object_position select 0, _object_position select 1, _object_position select 2]; 
//_isNotOk = true;
_isNotOk = false;
};
};
 
I've played with self-admited hackers, and afaik they can't inject vehicles. I knew one guy who could repair them and inject gear, but the server doesn't cross reference the database for gear like it does vehicles, because they actually exist as world table entries and vehicle instances; items don't.

We had a guy spawning in tons of Apaches and they weren't showing up on the SQL tables or on the admin maps. They can do it, but it is definitely a more advanced hack.
 
what does the server_objectupdate.sqf part do? - I had already removed the Killing a hacker line when doing this stuff on Celle... otherwise they'd get in and it would explode.

Also can the heli type be changed in that single line where it creates the Mi17? Or do I have to do anything else?
 
Ok; good on you for removing the hacker thing - you can leave that like that I think. I've updated the file links; and included a new change to the server_objectupdate.sqf. It keeps the server from just deleting the object when it doesn't have a valid ID.
 
Alright starting from scratch. Gonna test later tonight when ppl log off.

Edit: Test complete. Adding the part in the object update actually made them disappear after being shot don't know if that's what you wanted from them.

Also - still 2 helis and 2 squads still spawning... Don't understand S:
 
Is there a way to just make the air taxi and pilot invincible? This is part of something someone had lnked me a couple months back as init for the heli. Hopefully this is of value. Also as I had mentioned - it's still spawning 2 crews.. and i have absolutely no idea as to why.

Code:
init="this flyInHeight 180; this addEventHandler [""HandleDamage"", {false}]; nul = this spawn { while {alive _this} do { _this setFuel 1; sleep 60 } };  {_x allowdamage false} foreach crew this; this addWeaponCargo [""FoodCanBakedBeans"",2];  this addWeaponCargo [""ItemSodaCoke"",2]; this addWeaponCargo [""ItemBandage"",3]; this addWeaponCargo [""ItemMorphine"",1]; this addWeaponCargo [""ItemEpinephrine"",1]; this addWeaponCargo [""ItemBloodbag"",1];";
 
Is there a way to just make the air taxi and pilot invincible? This is part of something someone had lnked me a couple months back as init for the heli. Hopefully this is of value. Also as I had mentioned - it's still spawning 2 crews.. and i have absolutely no idea as to why.

Code:
init="this flyInHeight 180; this addEventHandler [""HandleDamage"", {false}]; nul = this spawn { while {alive _this} do { _this setFuel 1; sleep 60 } };  {_x allowdamage false} foreach crew this; this addWeaponCargo [""FoodCanBakedBeans"",2];  this addWeaponCargo [""ItemSodaCoke"",2]; this addWeaponCargo [""ItemBandage"",3]; this addWeaponCargo [""ItemMorphine"",1]; this addWeaponCargo [""ItemEpinephrine"",1]; this addWeaponCargo [""ItemBloodbag"",1];";


I've been thinking of something like that; I've tried the 'allowdamage false' setting, but it didn't seem to have an effect - I've been thinking of checking out the 'handledamage' event handler.
 
I've been thinking of something like that; I've tried the 'allowdamage false' setting, but it didn't seem to have an effect - I've been thinking of checking out the 'handledamage' event handler.

I'm not sure if I want the chopper invincible - if it crashes it should explode so it doesn't get stuck; and a new one will spawn. I guess you could have some supervisory scripts that checks for time between waypoints or something.
 
Is there a way to just make the air taxi and pilot invincible? This is part of something someone had lnked me a couple months back as init for the heli. Hopefully this is of value. Also as I had mentioned - it's still spawning 2 crews.. and i have absolutely no idea as to why.

Code:
init="this flyInHeight 180; this addEventHandler [""HandleDamage"", {false}]; nul = this spawn { while {alive _this} do { _this setFuel 1; sleep 60 } };  {_x allowdamage false} foreach crew this; this addWeaponCargo [""FoodCanBakedBeans"",2];  this addWeaponCargo [""ItemSodaCoke"",2]; this addWeaponCargo [""ItemBandage"",3]; this addWeaponCargo [""ItemMorphine"",1]; this addWeaponCargo [""ItemEpinephrine"",1]; this addWeaponCargo [""ItemBloodbag"",1];";

If you want you can try my scripts.txt; it's just spawning one chopper, but double the units? Or everything doubled?

Try my new uploaded Chopper Patrol.sqf; I've modified a bit the way AI spawns.
 

Attachments

  • scripts.txt
    50.8 KB · Views: 24
Alright I will give it another go. What am I to do with your scripts.txt? I've already got everything set to 1 cuz I hate turning shit off one at a time based on what i'm working on. Sure, no security.. but not like it was any good anyways.

And yes - it spawns double the troops and a second heli. all pretty much stacked on each other.
 
hello orcthrasher, i was wonder will the file NPC_AlertZombies.sqf works on the Sarge AI framework? if yes, how can i put into it ? can u give me a instruction? thank you
 
If you want you can try my scripts.txt; it's just spawning one chopper, but double the units? Or everything doubled?

Try my new uploaded Chopper Patrol.sqf; I've modified a bit the way AI spawns.

It is IMPOSSIBLE that BE is the reason for double helis. BE only logs scripts and script fragments that are run and does NOT interact at all.

My wild guess is you start the script twice.
 
hello orcthrasher, i was wonder will the file NPC_AlertZombies.sqf works on the Sarge AI framework? if yes, how can i put into it ? can u give me a instruction? thank you

What good is that? Zomnbies will not be able to damage NPCs ... They would stand around in circles at an NPC, trying to hit him while he shoots them down.
 
hello orcthrasher, i was wonder will the file NPC_AlertZombies.sqf works on the Sarge AI framework? if yes, how can i put into it ? can u give me a instruction? thank you

Yeah, Sarge is right. I hacked in a bullshit way for zombies to kill NPCs in my script, so there actually is an effect from them chasing NPCs. In Sarge's framework they don't interact, so they'd just clump around them until killed.

You could add it if you want the effect of the zeds reacting to npcs, and not ignoring them while they're shot - that's up to you. Just call it and pass the npc to the script, like so

Code:
[_aiunit,100,true,1] execvm "units\NPC_AngryZombies.sqf";  //Alert zombies when an NPC is in the area

'_aiunit' is the name of a unit that was just created.
You can change the 100 to however many meters you want to pull zombies from. I wouldn't make it too large.
 
Yeah, Sarge is right. I hacked in a bullshit way for zombies to kill NPCs in my script, so there actually is an effect from them chasing NPCs. In Sarge's framework they don't interact, so they'd just clump around them until killed.

You could add it if you want the effect of the zeds reacting to npcs, and not ignoring them while they're shot - that's up to you. Just call it and pass the npc to the script, like so

Code:
[_aiunit,100,true,1] execvm "units\NPC_AngryZombies.sqf";  //Alert zombies when an NPC is in the area

'_aiunit' is the name of a unit that was just created.
You can change the 100 to however many meters you want to pull zombies from. I wouldn't make it too large.
ok, so i put the line [_aiunit,100,true,1] execvm "units\NPC_AngryZombies.sqf"; //Alert zombies when an NPC is in the area .... at the end of the init.sqf rigt? and where can i download the NPC_AngryZombies.sqf? or i just change the NPC_AlertZombies.sqf to NPC_AngryZombies.sqf?
 
What good is that? Zomnbies will not be able to damage NPCs ... They would stand around in circles at an NPC, trying to hit him while he shoots them down.
yeh, becoz wt i put in my server is all AI against players and a lot of players feels like zeds should chase them eventhough they(AI) wont get any damages. another advantages are that zeds can chase AI and less zeds chase players and gives players the ablity to know where the AI are near
 
Greetings,

I want to make only NPC's (soldiers), attack the Zombie's and Bandit's. How i doing exactly? Please tell like a five years old children. lol

Note : I have PBO, i know how use PBO.
 
Edit - v1.0 (2013-03-12)

Added respawn ability, checking for the chopper stuck on the ground, and stuck hovering. Killing/shooting the chopper or any of the troops will instantly agro them, and will lower the attackers humanity. All weapons are removed from the AI on death, and their bodies are deleted 30 seconds after being killed.
 
Back
Top