eisa01 0 Posted December 22, 2002 i need a trigger to activate if two planes are inside a trigger area.at least 1 will be flying. i also need a trigger to activate if 1 plane is inside the area and the other is dead. hope ya understood me! Share this post Link to post Share on other sites
RED 0 Posted December 22, 2002 Make a trigger with west (or east depending on what side the planes are on) present. Make it the right size for the end area. In the triggers condition field put: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">planename1 in list this && planename2 in list this<span id='postcolor'> RED Share this post Link to post Share on other sites
eisa01 0 Posted December 22, 2002 i type in this </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">sop1 in list this && sop2 in list this<span id='postcolor'> when i preview this error message comes up: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">'sop1 in list this &&|#| sop2 in list this': Error list: Type Boo,l expected Object<span id='postcolor'> any ideas of what causing this? Share this post Link to post Share on other sites
RED 0 Posted December 22, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">sop1 in list trig1 && sop2 in list trig1<span id='postcolor'> Call the trigger trig1, sorry my mistake RED Share this post Link to post Share on other sites
eisa01 0 Posted December 22, 2002 thank you do you know how to make a trigger activate if one of the planes are dead and the other is inside the trigger area?? Share this post Link to post Share on other sites
RED 0 Posted December 22, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">sop1 in list trig1 && sop2 in list trig1 OR sop1 in list trig1 && not(alive sop2) OR not(alive sop1) && sop2 in list trig1<span id='postcolor'> That should do it. RED Share this post Link to post Share on other sites
Balschoiw 0 Posted December 22, 2002 Put this in Condition field: plane1 AND plane2 getdammage >=1; Share this post Link to post Share on other sites
eisa01 0 Posted December 22, 2002 THANK YOU BOTH youre almost making the mission for me Share this post Link to post Share on other sites
theavonlady 2 Posted September 21, 2004 I've got a similar trigger and it's not working. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class Item19 { position[]={1581.931152,24.974998,5549.689453}; a=50.000000; b=75.000000; rectangular=1; activationBy="WEST"; repeating=1; age="UNKNOWN"; text="Support Area"; name="Supportarea"; expCond="(tank2 in list Supportarea) and (aP in list Supportarea) and (canMove tank2)"; expActiv="support = true; hint ""support=true"""; expDesactiv="support = false; hint ""support=false"""; class Effects { }; }; It's simple, I want the trigger to activate if both the player (aP) and the player's vehicle (tank2) are within the trigger area and the vehicle is still functional. I also don't care if the player is in or out of the vehicle - just as long as they're both there. TIA. Share this post Link to post Share on other sites
redface 1 Posted September 21, 2004 just put .. in thislist twice, as it pertains to the area defined by your trigger hope this helps also the first AND is making it too restrictive you know that when a unit is in a vehicle, it becomes invisible to the OFP radar you can first put player == vehicle player to avoid this problem and then put vehicle player in thislist or use OR Share this post Link to post Share on other sites
theavonlady 2 Posted September 21, 2004 When I change: (aP in list Supportarea) to: (vehicle player in list Supportarea) it works unless I get out of the vehicle. Then it deactivates. But what doesn't it like about my unit name ."ap", that should activate the trigger and it's not - especially when I get out of the vehicle?! I've also tried substituting "player" for "aP" but it also didn't work when I left the vehicle. Here's what I have now that only triggers when I'm in the area in the vehicle: (tank2 in list Supportarea) and ((vehicle player in list Supportarea) or (player in list Supportarea)) and (canMove tank2) I'll change it to "thislist" later, when my headache here is over. I don't know why you say the first AND is too restrictive. Please explain. Logically it makes sense. Share this post Link to post Share on other sites
redface 1 Posted September 21, 2004 IMHO this should solve your problem Quote[/b] ]((vehicle player in list Supportarea) or (player in list Supportarea)) and (canMove tank2) BTW, this was one of the hidden spoilers in my "Realistic Crime City" mission: if you didn't leave the car, you could smash all the guards at ease without getting detected Share this post Link to post Share on other sites
theavonlady 2 Posted September 21, 2004 IMHO this should solve your problemQuote[/b] ]((vehicle player in list Supportarea) or (player in list Supportarea)) and (canMove tank2) No because it activates the trigger even when the vehicle is outside of the trigger area, as long as the player is within the area, either in a vehicle or out. The vehicle in intially defined as: side="EMPTY" with the player's init line saying: this moveInDriver tank2 I wonder what would happen if the vehicle started off as: side="WEST" with its init line set to remove its pilot. Do you remember the command that does that??? Seems like an OFP bug or limitation that OFP does not recognize that the empty vehicle is in the trigger area. Share this post Link to post Share on other sites
theavonlady 2 Posted September 21, 2004 I wonder what would happen if the vehicle started off as:side="WEST" with its init line set to remove its pilot. Do you remember the command that does that??? Solution on this thread I started a long time ago. I'll give it a try and see what happens. Share this post Link to post Share on other sites
shadow 6 Posted September 21, 2004 IMHO this should solve your problemQuote[/b] ]((vehicle player in list Supportarea) or (player in list Supportarea)) and (canMove tank2) No because it activates the trigger even when the vehicle is outside of the trigger area, as long as the player is within the area, either in a vehicle or out. The vehicle in intially defined as: side="EMPTY" with the player's init line saying: this moveInDriver tank2 I wonder what would happen if the vehicle started off as: side="WEST" with its init line set to remove its pilot. Do you remember the command that does that??? Seems like an OFP bug or limitation that OFP does not recognize that the empty vehicle is in the trigger area. How about this? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(player in list Supportarea) && (tank2 in list Supportarea) && (canMove tank2) Share this post Link to post Share on other sites
theavonlady 2 Posted September 21, 2004 How about this?<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(player in list Supportarea) && (tank2 in list Supportarea) && (canMove tank2) As I said earlier: Quote[/b] ]I've also tried substituting "player" for "aP" but it also didn't work when I left the vehicle. Here's what I have now that only triggers when I'm in the area in the vehicle:(tank2 in list Supportarea) and ((vehicle player in list Supportarea) or (player in list Supportarea)) and (canMove tank2) Something's not working here and it's driving me gaga! BTW, I tried the removing driver bit I mentioned just before. Same problem. EDIT: Just to refresh and say that the problem here is being caused by the check for tank2 in list Supportarea. It does not detect that. If that check is removed from the condition equation, the trigger activates when the player enters the area in the vehicle or on foot. What's interesting is that OFP knows about tank2 because the "canMove tank2" condition is being recognized, yet OFP does not acknowledge tank2's presenece in the trigger radius. <span style='color:red'>Any chance of getting a BIS developer here? Perdy please?</span> Something's very buggy here. Share this post Link to post Share on other sites
Bart.Jan 0 Posted September 21, 2004 Instead of trigger use game-logic unit (named point). Then check condition:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player distance point < 50 and tank2 distance point < 50 and canMove tank2 This replaces circular trigger with 50,50 axis (for land units only). You can check this condition in some trigger or in some script. Share this post Link to post Share on other sites
theavonlady 2 Posted September 22, 2004 Instead of trigger use game-logic unit (named point).Then check condition:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player distance point < 50 and tank2 distance point < 50 and canMove tank2 This replaces circular trigger with 50,50 axis (for land units only). You can check this condition in some trigger or in some script. Bravo! Using distance measure resolves the problem. But instead of defining a new game logic unit, I simply coded the trigger area's condition as follows: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(tank2 distance aP < 75) and ((vehicle player in thislist) or (aP in thislist)) and (canMove tank2) I tested this out with both armor and aircraft units, while both in and out of the vehicles. Now for an academic question: Why? Why isn't the presence of an empty vehicle in the trigger area detected? Was this because most people would use such a trigger only when the vehicle is active (and not in cases where it's destroyed or immobile, etc.)? If so, BIS should offer an option where an empty vehicle can be detected, too. Another to-do-item for OFP2. Thanks again, forum members! Power to the masses! Share this post Link to post Share on other sites
korax 4 Posted September 22, 2004 Now for an academic question: Why? Why isn't the presence of an empty vehicle in the trigger area detected? Was this because most people would use such a trigger only when the vehicle is active (and not in cases where it's destroyed or immobile, etc.)? Because it simply doesnt, vehicles arent exactly counted as to being on a side so the trigger only searches for living units. If the trigger were to search for all vehicles present in the area then you would have things like an empty tank or a dead unit screwing up your condition, just as you said. And if you have the trigger named "SupportArea" then you can refer to it as an object (unless you put list infront of it), so instead of placing an extra gamelogic called point you can just use<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player distance supportarea < 50 and tank2 distance supportarea < 50 and canMove tank2In the same triggers condition field  Share this post Link to post Share on other sites
theavonlady 2 Posted September 22, 2004 Now for an academic question: Why? Why isn't the presence of an empty vehicle in the trigger area detected? Was this because most people would use such a trigger only when the vehicle is active (and not in cases where it's destroyed or immobile, etc.)? Because it simply doesnt, vehicles arent exactly counted as to being on a side so the trigger only searches for living units. If the trigger were to search for all vehicles present in the area then you would have things like an empty tank or a dead unit screwing up your condition, just as you said. Understood. Yet there should be any ability in OFP2 to allow a new syntax to specify a unit name under any condition - empty, dead or whatever. Quote[/b] ]And if you have the trigger named "SupportArea" then you can refer to it as an object (unless you put list infront of it), so instead of placing an extra gamelogic called point you can just use<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player distance supportarea < 50 and tank2 distance supportarea < 50 and canMove tank2In the same triggers condition field  Yes, adjusted to do that: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(tank2 distance Supportarea < 60) and ((vehicle player in thislist) or (aP in thislist)) and (canMove tank2) Thanks! EDIT: Just to document that: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(tank2 distance Supportarea < 60) measures the 60 meters from the vehicle (possibly its center point - not sure) to the center point of the list area (named "Supportarea" in this example). OFP does NOT measure from the vehicle to the list area's outer perimiter boundary, when a list area is defined with non-zero A and B axis values. Share this post Link to post Share on other sites