Line 28: |
Line 28: |
| === [https://ryandwyer.gitlab.io/gepd-function-explorer/ge-global-0009.html Alarm guards] === | | === [https://ryandwyer.gitlab.io/gepd-function-explorer/ge-global-0009.html Alarm guards] === |
| Look around when alerted by a noise, a nearby shot or a hit on a guard that they can see. They then run to their assigned alarm and activate it on arrival, before becoming a normal guard and chasing bond (once). If they see Bond directly then they run to the alarm without looking around. | | Look around when alerted by a noise, a nearby shot or a hit on a guard that they can see. They then run to their assigned alarm and activate it on arrival, before becoming a normal guard and chasing bond (once). If they see Bond directly then they run to the alarm without looking around. |
| + | |
| + | == Technical Details == |
| + | |
| + | === Ghost Doors === |
| + | |
| + | Conditions for a guard to open a door: |
| + | |
| + | # The guard is walking along a path or chasing Bond |
| + | # The guard is within 2m of it (3D test, door considered as a point) |
| + | # The guard's chase timer is a multiple of 10 |
| + | # The door is the 1st one that the line from the guard to his local target point intersects |
| + | |
| + | All doors opened by guards are opened by this mechanic. It's worth noting that all double doors / gates / glass are actually just individual doors which are linked. Aztec glass consists of 3 doors. |
| + | |
| + | ; The chase timer |
| + | When a guard starts chasing Bond, the chase timer is set to a random value from 0 to 99, chosen uniformly. It increases by 1 every time the guard updates, which is every drawn frame I think (unlike PD). |
| + | So for 'frame perfect' tricks like ghost doors (see below), you effectively have a 1 in 10 chance of passing the chase timer test. And strats like mainframe glass get their consistency from having a large number of consecutive frames for which the guard passes the other tests. |
| + | |
| + | ;The local target |
| + | The intended purpose of the local target is to avoid dynamic objects like other guards and to navigate using the clipping tiles when they get close to their target. The standard way we manipulate these into / behind doors is by placing a second guard by the door, and the 1st guard sets their local target inside the door, trying to avoid the 2nd guard. But when a guard unloads, the local target doesn't get updated. And in fact the local target doesn't get updated until the 2nd frame that the guard is loaded. This will give rise to ghost doors. |
| + | |
| + | ; Example: Aztec Glass |
| + | |
| + | Video: [https://www.youtube.com/watch?v=_4ZNCrHcAkQ Behind the mainframe strat curtain]. |
| + | |
| + | Key: |
| + | * The 2m circle around the doors |
| + | * The guard's normal target |
| + | * The guard's local target |
| + | |
| + | The conditions are monitored in the top left. Condition 4 is True the whole time that the guard's local target is inside the door. |
| + | |
| + | The magic of the mainframe strat is that |
| + | |
| + | * because the 1st guard arrives unloaded, the 2nd guard's local target is always inside the glass |
| + | * the 2nd guard spends a long period in range of the door that he'll open |
| + | |
| + | Note that you mustn't be too far behind the crack when you do the lures, else the guard will only be able to open the middle glass "door". This completely loses this 2nd great advantage and the consistency will plummet. |
| + | |
| + | ; Example: Archives |
| + | |
| + | This is a general mechanic, so can be applied to any level but we'll deal with the classic archives one. As Henrik showed, it's the patrolling guard who opens it on the 1st frame that he loads, as he heads away from it. |
| + | |
| + | On Archives, Miskin is in the path of this guard, and the patrolling guard can spend a long time circling him, staying loaded. When I set up this ghost door myself, he was loaded when I lured him, and stayed loaded for a little while, even opening the door to Miskin's room. This put his local target directly behind the ghost door, before he then unloaded. |
| + | |
| + | He goes through the door unloaded and starts going along the corridor. When I loaded him then the line mentioned in condition (4) goes straight through the middle of the door. Conditions (1) and (2) are trivially true. And (3) is essentially a 10% chance. |
| + | |
| + | ; Limitations |
| + | |
| + | Local targets persist after resetting the level. But when guards first start chasing Bond (when the 28 command succeeds for the guard script boffins) they always set a flag invalidating the current local target. |
| + | |
| + | This restriction is worse though because it means that the guards must set their local target then unload and move to the front of the door in a single movement. They can't arrive somewhere and then hear you again or even chase you because they were alerted recently. |
| | | |
| == References == | | == References == |