LBALab / lba2remake

A Little Big Adventure 2 / Twinsen's Odyssey reimplementation in JavaScript / Three.js / React
MIT License
257 stars 38 forks source link

Implement var_game_to_track and track_to_var_game #646

Closed fraserjgordon closed 3 years ago

fraserjgordon commented 3 years ago

These opcodes load/store the current move track of an actor from/to a game var. Also check these opcodes when building the "only in scene" game var list in the editor.

The main use of these opcodes seems to be for implementing timers. For example, most (all?) areas on Desert Island contain an invisible actor (e.g. actor_19 in the School of Magic Classroom) that has a move script which has a chain of tracks and waits and a life script that continually saves the current track to a game var (var_80). This var is then used to drive the state of the Peddler as he travels around the island.

Preview here: https://pr-646.lba2remake.net