Show Posts

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.


Messages - s0beit

Pages: 1 2 [3] 4 5 6
31
The Guid is just a key hash so I don't see how this could ever work for anything.

32
Armed Assault 2 / Re: [RequestHelp] AI Spawn script DayZ - Beginner
« on: June 25, 2012, 04:26:11 pm »
Well, I've been trying this out

Code: [Select]
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;
};

It works but really, not that great. I'd rather the default logic handle all this bull but whatever.

33
Armed Assault 2 / Re: [RequestHelp] AI Spawn script DayZ - Beginner
« on: June 25, 2012, 02:17:53 pm »
I think the problem with them refusing to fire on people might boil down to the zombies being civilians, I can't think of anything else atm.

I might be able to change all the zombies to "EAST" on my client and just try that out.

34
Armed Assault 2 / Re: [RequestHelp] AI Spawn script DayZ - Beginner
« on: June 25, 2012, 01:57:28 pm »
That code makes way more sense... its easier to understand what is happening and where

Well, they still aren't very good at attacking zombies, but the firing does attract zombies D:

So they're basically like zombie alert squads more than bodyguards since they rarely shoot let alone hit anything (I'm working on it)

dayz specific yes , normal mission it varies usually between 2 factions.



Yep. Still don't really get why they won't kill the bastards but I'll keep messing with it

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.

That offers less control though doesn't it? Particularly because I don't see a way to grab the unit from there, so I wouldn't know how to modify it's behavior.

35
Armed Assault 2 / Re: [RequestHelp] AI Spawn script DayZ - Beginner
« on: June 25, 2012, 01:50:28 pm »
you may want to assign your ai to west btw.

Yeah I edited in before you did, haha, but joining my group should bring them over to west, I thought. (All players are BLUFOR)

36
Armed Assault 2 / Re: [RequestHelp] AI Spawn script DayZ - Beginner
« on: June 25, 2012, 01:38:12 pm »
Code: [Select]
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;}];

I've really tried everything to try to get them to attack zombies, but they're being retards about it.

The few times I did get them to shoot they did indeed kill them, but they're hesitating like assholes. I think AI is probably the worst handled thing in this entire API, I don't get it at all.

P.S. the player_fired function does indeed alert zombies.

EDIT: Now that I think about it, I didn't assign my AI to WEST did I? Oops.

37
Armed Assault 2 / Re: [RequestHelp] AI Spawn script DayZ - Beginner
« on: June 25, 2012, 11:42:50 am »
Take a look here:
http://forums.bistudio.com/showthread.php?100409-How-to-make-AI-killing-Civilians

Quote
CIVILIAN 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 commented

Quote
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.

Now, from the scripting reference:
Quote
When 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 things
Code: [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]

Well, as I understand it
Code: [Select]
//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;

As long as they're type is "Man", it should work out fine. I don't know why they wouldn't attack the new AI. There's probably a lot more to it than a simple target finder (for example zombies find you more easily when you fire, and attack, you might need to bind their firing event....)

Here's how DayZ does it, I believe

Code: [Select]
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;}];
};

So, if you do
Code: [Select]
_myNewUnit call fnc_usec_damageHandle;
It might work, though I don't suggest it (because of the killed event handler)

You might try something like:
Code: [Select]
_myNewUnit addEventHandler ["Fired", {_this call player_fired;}];
_myNewUnit addeventhandler ["HandleDamage",{_this call fnc_usec_damageHandler;0} ];

and see if that helps you

EDIT: Although there's a lot of player specific variables in those callbacks, I can't say for sure it's a great idea. Remove the HandleDamage callback if you have issues, you might need to make your own.

FINAL EDIT: You mentioned that they couldn't hurt zombies either, you might ALSO need your own damage handler for zombies... sounds like a pain in the butt tbh.

38
Armed Assault 2 / Re: [RequestHelp] AI Spawn script DayZ - Beginner
« on: June 25, 2012, 11:12:55 am »
Take a look here:
http://forums.bistudio.com/showthread.php?100409-How-to-make-AI-killing-Civilians

Quote
CIVILIAN 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 commented

Quote
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.

Now, from the scripting reference:
Quote
When 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 things
Code: [Select]
_spawnAIS enableAI "TARGET";
_spawnAIS enableAI "AUTOTARGET";
_spawnAIS setSkill 1;
_spawnAIS setCombatMode "RED";
_spawnAIS setBehaviour "AWARE";

39
Armed Assault 2 / Re: a wild vehicle spawn thread appears
« on: June 24, 2012, 03:07:37 pm »
:D 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)

I was able to complete it, but like Medic said it's not something that's wise to do. You're honestly better off with local vehicles.
If you still want this (seems you don't), it's as easy as understanding how executing code on the server is supposed to work. (or even code in general)

The hint was in my last post.

40
Armed Assault 2 / Re: a wild vehicle spawn thread appears
« on: June 23, 2012, 05:27:41 pm »
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.

Question: How is the server supposed to know what _object even is?

41
Armed Assault 2 / Re: so how did the bans work?
« on: June 23, 2012, 01:10:24 pm »
BattlEye is sending all scripts in memory to the server so editing them in memory at all will result in a ban, FYI. Doesn't matter at all if CE is open or not.

42
Armed Assault 2 / Re: Can't inject arma2oa.exe without it crashing
« on: June 23, 2012, 02:16:39 am »
Your DLL is probably the cause of it, not winject.

I'm injecting just fine.

43
Armed Assault 2 / Re: Guid change for steam?
« on: June 22, 2012, 05:16:17 am »
Steam resets your key for every game (that has a key) when you launch the game, just launch arma2 with steam closed.

44
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.


45
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

Nothing wrong with selling something you put hard work into.

I'm sure people would probably pay for DayZ (didn't rocket mention something about making it standalone? I'm sure you'd have to pay for that). He's a good guy for releasing something for free but not everyone is obligated to follow his example.

Pages: 1 2 [3] 4 5 6