julyTenth 0 Posted February 13, 2002 I've been playing around with a mission where the player (West) should remain undetected by the East. A "West detected by East" Trigger would seem to be the best way to check that this happens, but I'm having some problems with it. Specifically, even if I take out an East unit in one shot, with no other units around to see either me or the victim, the trigger still fires. This would appear to mean that I'm being detected by a DEAD east unit. Is there a way to make a trigger fire only if the west is detected by a living enemy? thanks Share this post Link to post Share on other sites
Rob 1 Posted February 13, 2002 the only other way is that he may already activate it before you kill him.... and i dont understand why your using west and east to activate a trigger.... whats the specific thing your trying to achieve? Share this post Link to post Share on other sites
kegetys 2 Posted February 13, 2002 I think that the only way to do it properly is to use the "knowsabout" command... Share this post Link to post Share on other sites
mahuja 12 Posted February 13, 2002 You are detected (as per the trigger) once they know of your presence. If you make noise like shooting, (or driving heavy vehicle/chopper) they'll know you're there even if they cannot pinpoint you. Share this post Link to post Share on other sites
NEO -PZ- 0 Posted February 13, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Kegetys @ Feb. 13 2002,14:07)</td></tr><tr><td id="QUOTE">I think that the only way to do it properly is to use the "knowsabout" command...<span id='postcolor'> How do you use this "knowsabout" command? Share this post Link to post Share on other sites
ConanOfOz 0 Posted February 13, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">I think that the only way to do it properly is to use the "knowsabout" command...<span id='postcolor'> How do you use this "knowsabout" command?<span id='postcolor'> From the unoffical OFP guide... </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">KnowsAbout Description : Tells how much one unit knows about another. Syntax : Unit1 KnowsAbout Unit2 Unit1 is the name of a unit Unit2 is the name of another unit Returns : Value between 0 and 4. 0 means Unit1 does not know about Unit2 4 means Unit1 knows exactly where Unit2 is, and what he is. This value will decrease over time and distance. Will also lower if unit1 is not in view of unit 2 (i.e. behind bushes). Â Example : ?(MyEnemy KnowsAbout MyGuy > 2): exec "soundalarm.sqs" Notes : Units will not fire at an enemy unit if the knowsabout value is 1 or less. <span id='postcolor'> Share this post Link to post Share on other sites
julyTenth 0 Posted February 14, 2002 sorry, i made a bit of a mistake with my testing of the trigger. turns out i was being "detected" by another East unit, but i was fooled into thinking I wasn't because he didn't respond in any way - ie he was standing in "Safe" mode, but he didn't bring his gun out or otherwise react (does this mean his knowsAbout of me was less then 2?) Can the "knowsabout" command be somehow used in script that runs through ALL Eastern units to check how much they know about the player, and then if one or more Eastern units knowsAbout >= 2, then a global variable player_detected is set to true or something? Share this post Link to post Share on other sites
louis 0 Posted February 15, 2002 Whilst I was testing one of my scripts with 4 guys on a sentry WPoint I had the knowsabout value reported to me at regular intervals. The first sighting returned less than 1 generally, .6 typically and this made the sentry move a bit but he didn't really react or take his gun off his back. Generally I'd see a proper reaction around 1.3 ish. Hope this helps. Louis Share this post Link to post Share on other sites
ConanOfOz 0 Posted February 15, 2002 I've been doing tests to see what the behaviour is of various aspects of the game relative to this detection issue. The "awareness" level, as determined by the KnowsAbout function has given me some interesting values. Scenario... A detection trigger -- West Detected by East. Â Effect set to sound the alarm. A rolling SideChat repeating every 2 seconds to tell me the KnowsAbout value of Target1 (the guy I'm going to shoot). Â There are no other enemies close enough to detect my rifle shot. Â For brevity, I'll use "KA =" for the KnowsAbout Scenario 1 Move undetected to within about 10 metres behind Target1. Â Shoot him in the head with Kozlice. Â Whether he dies or not, KA = 4. Â If he dies, KA drops in small decimal amounts (e.g. 4, 3.98723, 3.9218.....). Â Naturally, the alarm sounds. Scenario 2 Move as above, but fire with HK. Â If he drops dead from 1 shot, KA = 1.5 (consistently), otherwise KA jumps to 4 unless you didn't hit him, in which case KA = 0.25. Â The first two cases set off the alarm, the last one does not. There are variations to what action causes what KA level, but the key I think is what KA level activates the alarm (in other words, triggers my "Busted" Trigger). Â From the data above, I am guessing a KA level >= 1 will constitute "detection". The Problem Well, that is how to determine who detected you. Â Simply put, we see that a soldier whom you've just introduced to God is able to trigger "Detection", and this should not be so. It seems the Trigger is using KA to determine whether or not Detection has occured, but is failing to consider if the detecting entity has just died. Further more, the KA level drops very slowly afterwards, which says that the Trigger is not considering at all the status of the detecting unit (as opposed to maybe just being a simple timing issue). In short, this Trigger scenario has a bug in it. Solution I can see only one way to address this...Replace the detection criteria of a trigger with our own script. Â This script will be started at the beginning of the mission and run throughout (or at least as long as secrecy on your part is required). Here is what I suggest... In your init.sqs add "Busted = False" Place a trigger on your map, Activation=None, Condition = Busted. Â I might be wrong about Activation (comment anyone?) The script's job is to test each and every enemy unit to see if KA >= 1 and the unit is alive. Â If that condition is met, the script sets "Busted" to "True", setting off our trigger which can then sound an alarm, trigger an end to the game (I'm assuming you want this condition to constitute Mission Failure). This script should continue to loop, but I believe it should have a delay after completing each pass through the enemy ranks. Â Just how much delay I'm not sure... 0.25? Â 1? Â More? Â You'll have to suck it and see. Important Variation I found this whole idea fascinating, but would like for myself to continue the mission, perhaps with increased enemy activity for the next "x" minutes as a result (like a Hind searching for me for a while). So, my "Busted" trigger has no "End" selections, but On Activation is going to call "RedAlert.sqs" This script is going to coordinate the "search effort", and will decide when to return to "normal" vigilance status. The search effort can be as clever as you want it to be. Â Maybe this routine should do a quick KA iteration to determine which unit did the spotting. Â This gives you a KA level, and a location on the map. Â I would suggest the KA determine how long Red Alert status lasts, and of course the map location determines where the search begins. Well, time to get offline and try to write all the above Share this post Link to post Share on other sites
julyTenth 0 Posted February 15, 2002 thanks for your input, ConanOfOz the basic design of my mission was (in theory) pretty much what you described in your solution and variation, but i'm stuck for ideas on how to implement a script that would cycle through every unit from the eastern side to perform the relevant functions (checking for signs of life, and their knowsAbout value) any ideas you can provide in this regard would be greatly appreciated Share this post Link to post Share on other sites
ConanOfOz 0 Posted February 16, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (julyTenth @ Feb. 16 2002,01:28)</td></tr><tr><td id="QUOTE">thanks for your input, ConanOfOz the basic design of my mission was (in theory) pretty much what you described in your solution and variation, but i'm stuck for ideas on how to implement a script that would cycle through every unit from the eastern side to perform the relevant functions (checking for signs of life, and their knowsAbout value) any ideas you can provide in this regard would be greatly appreciated<span id='postcolor'> I think I'm pretty close to a solution. So long as I don't run into something unexpected, I think I'll have an answer for you (us, really, this is a generic solution) tomorrow. Share this post Link to post Share on other sites
ConanOfOz 0 Posted February 17, 2002 *bump* "Ouch"! I just ran into something unexpected You wouldn't expect it... My script will not Loop. That's right, a simple Goto "somelabel" is not functioning. You'll see a couple of posts from me asking some questions -- these explain the problem(s) so I won't repeat it here. The good news is I beleive I have the logic of what we need correctly developed but, of course, I can't test that arrogance until I can make the script work I'll keep you posted. Once I have a functioning "ScanForDetection.sqs" I'll probably start a new topic to announce it, and invite improvements from others... Share this post Link to post Share on other sites
ConanOfOz 0 Posted February 18, 2002 Alright, for the moment, the behemoth know as ScanForDetection.sqs has been adbondoned. A far simpler script has taken it's place and, blow me down, seems to work quite as well as it's big brother. I've placed it in a new topic called SimpleScan, since this is the name of the new script. BTW, it works for me... Share this post Link to post Share on other sites
Biggs 0 Posted February 26, 2002 I had some minor issues with the west detected by east or vice versa. If other soldiers detect you the problem is obvious. My problem was even if no one else can detect you and you instantly kill your target, I guess technically he still knows of your presense for a split second. My solution was to put a timeout timer on the trigger. That way they have to detect you for however long you specify, and if they die before that timer runs out, it won't trigger. This may not be exactly what you need, but it is helpful anyway. Share this post Link to post Share on other sites