Attract-Mode Support Forum

Attract-Mode Support => Scripting => Topic started by: ArcadeBliss on August 10, 2016, 08:21:10 PM

Title: [image].rawset_index_offset explination
Post by: ArcadeBliss on August 10, 2016, 08:21:10 PM
The property rawset_index_offset is not in the documentation. Can anyone explain what it does?
Title: Re: [image].rawset_index_offset explination
Post by: raygun on September 06, 2016, 01:28:28 PM
When you set the index_offset property of an object in squirrel, the frontend goes off and loads the new image/video at that image offset right away so it is immediately available.

rawset_index_offset() is an optimization/hack that allows scripts to do essentially the same thing (set the index_offset), but without triggering any of this reloading by the frontend that normally happens when the property is set.  This can be useful if the script knows that image loading is about to be triggered anyways (such as during a start navigation transition callback).  I'm pretty sure the only thing using this currently is the conveyor module.

cheers
Title: Re: [image].rawset_index_offset explination
Post by: ArcadeBliss on October 14, 2016, 06:51:18 AM
Thanks for the explanation. I recently altered the conveyor module to allow the creation of a menu based off of a table and the reason for this property was puzzling to me. Do you mid putting the explanation in the layouts.md for others?