Forum Jump :

Author Message


Posts: 12
Rank:


Level: Member

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

 
#1 Posted at 2013-03-23 01:15        
     
How can you make BlueFor/OpFor detectable by area triggers when they are set to "setCaptive true"? I've tried making triggers triggerable by civilians but this does now allow any units or items within the trigger area (ammo boxes, etc.).

Any work-arounds for this? Perhaps using "isKindOf" to mark each captive unit?


Author Message


Posts: 1473
Rank:


Level: Member

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

 
#2 Posted at 2013-03-23 02:39        
     
One way could be just to group the trigger to the unit and set the trigger to present.
That will just check one unit to see if it's in the trigger area

You could also just check the units name if they're known

set the trigger anyone present

cond
man1 in thislist or man2 in thislsit


Advertisement


Author Message


Posts: 12
Rank:


Level: Member

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

 
#3 Posted at 2013-03-23 03:35        
     
The problem is that i have many AI OpFor units that must trigger it, grouping them could get quite messy and the list would be quite long.


Author Message


Posts: 1473
Rank:


Level: Member

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

 
#4 Posted at 2013-03-23 13:08        
     
Actually I never noticed before there is a captive check command

anyone present repeating
cond
{captive _x} count thislist >0


However it may not do what your after due to the way triggers work.

It will detect the first unit entering the trigger but as long as he stays there others will not be detected.


Author Message


Posts: 12
Rank:


Level: Member

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

 
#5 Posted at 2013-03-23 23:48        
     
I actually went with your advice and individually named the units which then activate specific triggers, works great.

My only problem now is that i need to "reset" the setCaptive true upon respawn, as it is right now, when the unit dies with setCaptive false, they respawn with setCaptive false. Do you know of a way i can add a line of code into the init that will setCaptive true upon respawn? (SOLVED, see below)

This post was edited by ZuluZulu (2013-03-24 00:43, ago)


Author Message


Posts: 1473
Rank:


Level: Member

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

 
#6 Posted at 2013-03-24 00:17        
     
Sorry I know nothing about MP stuff but you may need to run some sort of respawn script that can preserve what's in the init of the object.


Author Message


Posts: 12
Rank:


Level: Member

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

 
#7 Posted at 2013-03-24 00:27        
     
Yeah i have a respawn line in the player's init that reloads the weapons and equip upon respawn but i cant figure out how to repurpose it for the setCaptive. The respawn line reloads from a sqf file so i tried putting the setCaptive inside that, but it didnt work.

SOLVED: I'm retarded, simple change to the line got it to work by putting the setCaptive into the sqf file that is loaded on respawn (changed from "this" to "_unit").

This post was edited by ZuluZulu (2013-03-24 00:43, ago)