Jump to content
Sign in to follow this  
xealot

Setting wild life to enemy

Recommended Posts

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

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

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

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

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

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 by oyman

Share this post


Link to post
Share on other sites

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×