xealot 0 Posted October 16, 2009 Hello! I need to know how I can make any animal a target that the AI will auto engage? I tried to use the setFriendly function, the biki says they are of side wild life but setting setFriendly["wild life",0] didnt work and without quotes generated an error hint ["%1", side someAnimal] shows their side as being CIV, so doing setFriendly[civilian, 0] actually caused my shilka to kill Some nearby animals but not many of them.. What are your ideas? it has to be a reliable way to ensure that the animals will be shot thanks, -X Share this post Link to post Share on other sites
Big_Daddy 10 Posted October 16, 2009 Thats about the only way. Share this post Link to post Share on other sites
xealot 0 Posted October 16, 2009 okay, but I will need to create the animals myself as they will need an event handler, perhaps I could put them in a group with an enemy unit that is not existant? sort of like the trick with the editor to make a group with an officer of the enemy team with 0% probability of precense ideas are welcome Share this post Link to post Share on other sites
Big_Daddy 10 Posted October 16, 2009 why don't you tell us what your trying to do? Share this post Link to post Share on other sites
xealot 0 Posted October 16, 2009 Exactly as its written, I am going to do a map where the animals will be the primary target, spawned in a designed area and the reason for the event handler will be so that death will be triggered and score recorded The AI needs to be able to recognise the animals as belonging to an enemy faction and engage them Share this post Link to post Share on other sites
Big_Daddy 10 Posted October 16, 2009 Ok, how are you creating the animals? via script, or via the Ambient wild life module? If via script, you can make the animals whatever side you wish. then they will be on that side. And AI will attack them if that side is enemy. The trouble with making CIV an enemy with: east setfriend [civilian, 0]; is that east will not only attack animals, but empty vehicles, houses, everything around them that isn't east. Share this post Link to post Share on other sites
xealot 0 Posted October 16, 2009 Hello again, I havent actually started much besides actually trying to get the animals shot by the AI but I suppose spawning them via a script will be the way to go. I am having a bit of trouble though, how exactly do I spawn them? not to sound like a complete fool but in order to make them the enemy id need a group from the enemy faction first, I suppose I could spawn a soldier like. "GUE_Soldier_1" createUnit [getMarketPosition something, animalGroup]; and then simply make animals inside the animalGroup, but then id have a guerilla soldier wandering about.. can I prevent him from spawning or do I have to make some ugly "hack" like moving him to pos 0,0,0 and kill him? Share this post Link to post Share on other sites
Big_Daddy 10 Posted October 16, 2009 createGroup createUnit Use create group for the enemy side (east/west) then use createUnit for whatever animals you want. ie: _grp = creategroup east; "Goat" createUnit [getpos animalspawn1, _grp] Share this post Link to post Share on other sites
oyman 0 Posted October 16, 2009 (edited) you can edit the sqm file and change thier side thru there. this is the original class Item3 { position[]={3201.3516,311.81854,10100.731}; special="FLY"; id=4; side="CIV"; vehicle="Cow04"; leader=1; skill=1; }; and you just change thier side to east like this. class Item3 { position[]={3201.3516,311.81854,10100.731}; special="FLY"; id=4; side="EAST"; vehicle="Cow04"; leader=1; skill=1; }; and this is the result:) its also possible to make a .pbo addon version Edited October 16, 2009 by oyman Share this post Link to post Share on other sites
Big_Daddy 10 Posted October 16, 2009 mmMMmmm.. bbq.. :) Share this post Link to post Share on other sites
xealot 0 Posted October 16, 2009 Super, thanks for that to both of you. small preview of what im doing: http://xealot.winsbydefault.com/arma2/arma2%202009-10-16%2022-21-15-56.png Share this post Link to post Share on other sites
mpatton 10 Posted October 16, 2009 What if you spawned an enemy soldier and set the probability of presence to zero, then grouped the animals to said soldier? It works with infantry. Share this post Link to post Share on other sites
oyman 0 Posted October 16, 2009 What if you spawned an enemy soldier and set the probability of presence to zero, then grouped the animals to said soldier? It works with infantry. you cant do that with animals Share this post Link to post Share on other sites
Big_Daddy 10 Posted October 17, 2009 And you can't set prob of presence via script. Share this post Link to post Share on other sites