Sly 1:LOCKG: Difference between revisions
Fixed formatting, added links
TheOnlyZac (talk | contribs) (Created article for data structure) |
TheOnlyZac (talk | contribs) (Fixed formatting, added links) |
||
Line 1:
{{todo|Cleanup, add memory addresses, fix formatting}}
'''LOCKG''' (likely short for '''Lock
== Structure ==
Line 7:
== Implementation ==
When the trigger volume associated with a LOCKG is triggered it sets off a sequence of events. It starts with the animation that spawns a [[KEY]] for each [[LOCK]] in the <code>apLock</code> array.
At some point a message with ID 0xXXX{{check}} is sent to the [[JT (Sly 1)|JT]] struct. This message is processed by <code>HandleJtMessage</code>, which checks if the <code>ckey</code> on the current [[WS]] (World State) is greater than the <code>cpLock</code>{{check}} on the LOCKG (ie. it checks if you have enough keys to open the lock).
If the check passes, it uses the LOCKG’s FWS as a bit mask to set the corresponding flag on the
Once all locks
=== Example ===
In Prowling the Grounds, the LOCKG which handles
If the check fails, nothing happens. If the check passes, it sets the SMA goal to 0xXXXXXX{{check}}, which
== Notes ==
* The <code>apLock</code> field is an array of 8 LOCK pointers. You can change these to point to any other entity in the level and they key will fly to and delete that entity instead. If you use this method to delete JT, the cutscene can’t complete and the game
[[Category:Data structures]]
|