Forum Jump :

Author Message


Posts: 3
Rank:


Level: Member

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

 
#1 Posted at 2014-09-05 06:33        
     
so... this is the situation:
i create my team, i create several enemies, enemies have in the init line "this hideobject true;" so they dont show. this is working fine. if i make a basic blufor present trigger i can make them appear and disappear everytime i activate it. but i need a more complex trigger that activates for each unit separately and repeatedly. for example : if (any enemy unit) distance to "my group" <2500m ... then (this unit) hideobject false. that way it appears, on dea (this unit) hideobject true again. that way it only renders the enemies close so that i can put more enemies in the map.
how i explained myself.
i just need the trigger cause i can make it work with simple triggers. the problem is how to make the trigger general for every enemy unit, so i dont have to make a trigger for each unit or group. the trigger should trigger everythime a unit gets closer that 2.5 km, and deactivate once they leave. and the "action" is hideobject true/false applied to that unit or group. i dont know what else to say, i dont think i have explained myself very ell so ill be happy to answer any questions


Author Message

Tajin  



Posts: 433
Rank:


Level: Member

Country: de
Location: Bavaria
Occupation: Communications Designer
Age: 33
In-game name: Tajin

 
#2 Posted at 2014-09-09 10:08        
     
I'd suggest some searching on this and the bohemia forums. There are several scripts already available that handle AI compression. Or dynamic spawning.

One rather simple but effective solution works in a way so it reduces a group to only it's leader when no players are nearby. That way performance is increased but the group is still able to react and move around.

As I said, there are already scripts for that, I just don't remember them by name right now.

There are a lot of very capable people on this forum, willing to spend some of their time to help you out. So if you have a problem, it surely isn't too much to ask that you atleast take the time to describe it properly. Thanks.