31
Armed Assault 2 / Re: Been "GUID" banned? Want to be unbanned? ~View here~
« on: June 26, 2012, 05:47:39 am »
The Guid is just a key hash so I don't see how this could ever work for anything.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
while {alive _spawnAIS} do
{
_findTa = nearestObjects[_spawnAIS, ["zZombie_Base"], 150];
_victim = _findTa select 0;
if(_victim isKindOf "zZombie_Base") then {
_spawnAIS dotarget _victim;
_spawnAIS dofire _victim;
};
sleep 10;
};
That code makes way more sense... its easier to understand what is happening and where
dayz specific yes , normal mission it varies usually between 2 factions.
a much simpler way is to :
[getPos aPos, EAST, 5] call BIS_fnc_spawnGroup
or : rather elongated version of the same
[getPos aPos, EAST, ["TK_INS_Bonesetter_EP1", "TK_INS_Soldier_2_EP1"],[],[],[],[],[],180] call BIS_fnc_spawnGroup
etc.
you may want to assign your ai to west btw.
TitleText [format["Bodyguard has your back son"], "PLAIN DOWN"];
private["_spawnAIS", "_plrGroup"];
CIVILIAN setFriend [WEST,0];
WEST setFriend [CIVILIAN,0];
_plrGroup = group player;
_plrGroup allowFleeing 0;
_plrGroup setFormation "LINE";
"Functionary1_EP1" createUnit [[(getpos player select 0), (getpos player select 1), 50], _plrGroup, "_spawnAIS = this;"];
_spawnAIS enableAI "TARGET";
_spawnAIS enableAI "AUTOTARGET";
_spawnAIS enableAI "MOVE";
_spawnAIS enableAI "ANIM";
_spawnAIS enableAI "FSM";
_spawnAIS enableSimulation true;
_spawnAIS allowDammage true;
_spawnAIS setCombatMode "RED";
_spawnAIS setBehaviour "COMBAT";
_spawnAIS setUnitRecoilCoefficient 0;
_spawnAIS addweapon "M4A1_AIM_SD_camo";
_spawnAIS addMagazine "30Rnd_556x45_StanagSD";
_spawnAIS addMagazine "30Rnd_556x45_StanagSD";
_spawnAIS addMagazine "30Rnd_556x45_StanagSD";
_spawnAIS addMagazine "30Rnd_556x45_StanagSD";
_spawnAIS addMagazine "30Rnd_556x45_StanagSD";
_spawnAIS addMagazine "30Rnd_556x45_StanagSD";
_spawnAIS addMagazine "30Rnd_556x45_StanagSD";
_spawnAIS selectWeapon "M4A1_AIM_SD_camo";
_spawnAIS setSkill ["aimingAccuracy",1];
_spawnAIS setSkill ["aimingShake",1];
_spawnAIS setSkill ["aimingSpeed",1];
_spawnAIS setSkill ["endurance",1];
_spawnAIS setSkill ["spotDistance",1];
_spawnAIS setSkill ["spotTime",1];
_spawnAIS setSkill ["courage",1];
_spawnAIS setSkill ["reloadSpeed",1];
_spawnAIS setSkill ["commanding",1];
_spawnAIS setSkill ["general",1];
[_spawnAIS] join _plrGroup;
_spawnAIS addEventHandler ["Fired", {_this call player_fired;}];
Take a look here:
http://forums.bistudio.com/showthread.php?100409-How-to-make-AI-killing-CiviliansQuoteCIVILIAN setfriend [INDEPENDENT,0]; INDEPENDENT setfriend [civilian,0]
That will make civilians and Independents be unfriendly.
same goes for OPFOR and BLUFOR etc.
somebody else also commentedQuoteWhether you use addRating to make them side ENEMY (hostile to everyone), or change their side to East/West/Guer to make them hostile to only one/two sides, or if you just want to use doFire to force a specific unit to kill another specific unit.
Now, from the scripting reference:QuoteWhen the rating gets below -2000, the unit's side switches to "ENEMY" and the unit is attacked by everyone.
However,Code: [Select]private["_unit","_type","_rnd"];
_type = _unitTypes call BIS_fnc_selectRandom;
_unit =_type createUnit [_position, _group,"", 1.0, "corporal"];
_unit setSkill 1.0;
_unit addRating -3000;
is how zombies are created, so i assume the rating isn't taken into consideration.
It could also be a problem with how your AI is acting, I use these flags to do some thingsCode: [Select]_spawnAIS enableAI "TARGET";
_spawnAIS enableAI "AUTOTARGET";
_spawnAIS setSkill 1;
_spawnAIS setCombatMode "RED";
_spawnAIS setBehaviour "AWARE";
Thank you for your response.
So far I have tried
CIVILIAN setfriend [WEST,0];
WEST setfriend [CIVILIAN,0];
It seems as though they are now finding the zombies as a hostile force, but it doesn't seem like they are inflicting damage on them.
Something else that seems to complicate this is that I do not think the zombies are programmed to attack anything other than players. (I was hoping aligning them to the player group would change that).
~
When the player kills a friendly, does that initiate a script to cause the player rating to go -2000? (Seems to make sense) [side-study]
//Find targets
_targets = _lead nearTargets _range;
{
private["_obj","_dis"];
_obj = _x select 4;
_dis = _obj distance _lead;
if (_obj isKindOf "Man") then {
if (!(_obj isKindOf "zZombie_Base") and !(_obj in _targetMen)) then {
//process man targets
_targetMen set [count _targetMen,_obj];
_targetDis set [count _targetDis,_dis];
};
} else {
if ((_obj isKindOf "AllVehicles") and (count crew _obj > 0) and !(_obj in _targetMen)) then {
//process vehicle targets
_targetMen set [count _targetMen,_obj];
_targetDis set [count _targetDis,_dis];
};
};
} forEach _targets;
fnc_usec_damageHandle = {
/***********************************************************
ASSIGN DAMAGE HANDLER TO A UNIT
- Function
- [unit] call fnc_usec_damageHandle;
************************************************************/
private["_unit","_eh"];
_unit = _this select 0;
mydamage_eh1 = _unit addeventhandler ["HandleDamage",{_this call fnc_usec_damageHandler;0} ];
mydamage_eh2 = _unit addEventHandler ["Fired", {_this call player_fired;}];
mydamage_eh3 = _unit addEventHandler ["Killed", {_id = [] spawn player_death;}];
};
_myNewUnit call fnc_usec_damageHandle;
_myNewUnit addEventHandler ["Fired", {_this call player_fired;}];
_myNewUnit addeventhandler ["HandleDamage",{_this call fnc_usec_damageHandler;0} ];
CIVILIAN setfriend [INDEPENDENT,0]; INDEPENDENT setfriend [civilian,0]
That will make civilians and Independents be unfriendly.
same goes for OPFOR and BLUFOR etc.
Whether you use addRating to make them side ENEMY (hostile to everyone), or change their side to East/West/Guer to make them hostile to only one/two sides, or if you just want to use doFire to force a specific unit to kill another specific unit.
When the rating gets below -2000, the unit's side switches to "ENEMY" and the unit is attacked by everyone.
private["_unit","_type","_rnd"];
_type = _unitTypes call BIS_fnc_selectRandom;
_unit =_type createUnit [_position, _group,"", 1.0, "corporal"];
_unit setSkill 1.0;
_unit addRating -3000;
_spawnAIS enableAI "TARGET";
_spawnAIS enableAI "AUTOTARGET";
_spawnAIS setSkill 1;
_spawnAIS setCombatMode "RED";
_spawnAIS setBehaviour "AWARE";
They check the hive now, *Sarcastic* I gotz global banndez.
No, I knew I was close (or maybe not close at all) but was just missing something. I don't need to cheat anymore seeing as I have a group of friends who now play. Now it's actually fun to play legit! (Usually is fun to play legit)
Code: [Select]_class = "UH1H_DZ";
_location = position player;
_dir = getDir player;
_server = dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
_object = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"];
_object setdir _dir;
_object setpos _location;
_object setVariable ["153912", _class, true];
sleep 0.1;
player setVehicleInit _server;
processInitCommands;
clearVehicleInit player;
hint "Vehicle Spawned, Code Activated, Still Blowing Up?"
I knew why my previous scripts were blowing up, but I haven no clue what's wrong right now.Code: [Select]dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object]
I'm executing this through the server. This SHOULD be adding it to the database, but I don't know why it's not. I looked through the code, and they haven't added any extra protection (that I can see)
Any advice to my script? (That's a new one)
I did this code pretty much myself, so it's not the best. If you see any mistakes I made, point them out please.
Wow what a fucking loser you are if you actually laugh at this shit. So the fuck what? If Michael Jackson releases an album he made by himself to his fans for free no shit he would get paid from his contract. But his contract doesn't include making a free album, it's him doing it on his own.
s0beit is a boss. Mr Medic is selling his mod-apps for $145. WTF. More than the game itself. mod-appers are profiting from this mod that's in alpha build while the person that made the game, rocket, has made little to nothing. lolwut