Forum Jump :

Author Message


Posts: 2
Rank:


Level: Member

Country: es
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2019-04-04 18:23        
     
Hi, this is my first consultation in this forum I think.
I want to make the behavior of the AI in the jungle more realistic and I have thought of making any unit that is closer to 50 meters or less change from Careless mode to Combat and switch back to careless when there are no enemies nearby.
I have tried several things already but I can not get it to work well. I have achieved it when a single soldier is less than 50 meters from another but when it is a group I do not get it.
Also I want it to happen with all the units for each side that are next.


Author Message


Posts: 8
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2019-04-17 10:16        
     
Hey,

maybe you could attach triggers to each OPFOR group leader for example with attachTo.

And do something like ...
Axis a: 50 Axis b: 50
Activation:
BLUFOR present
Repeatedly
On Act.:
leader reveal [_x, 1] foreach nearestobjects [units group leader,["Man"],50];
or just
leader setBehaviour "AWARE";

I guess you should move the whole thing in a script and just execute the script with the trigger.
Maybe you want something like if (_x == EAST) then {do stuff} else {exit} too.
You also want to pass down the trigger to the next leader if the first one dies or delete it if all units in this group die.

Might not be the best solution. I bet you could work with nearTargets too and don't use a trigger at all, atleast not a attached one.
Hope this helps.

Cheers.