New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get a proper instance reference from fe.obj to the defined object #426

oomek opened this Issue Feb 10, 2018 · 1 comment


None yet
1 participant

oomek commented Feb 10, 2018

This is not entirely an issue, but rather lack in my knowledge or AM limitation. Also I doubt I would find an answer to this issue on the forum.

I would like to iterate through a fe.obj table and transform the instances, but skip the ones in the defined ignore list which contain the objects to ignore.

Imagine the scenario:

local snap1 = fe.add_artwork( "snap" )
local snap2 = fe.add_artwork( "snap" )
local snap3 = fe.add_artwork( "snap" )

local ignore = snap2 //this will be a table but for now it's just one object for simplicity
foreach( obj in fe.obj)
    if( obj != ignore) obj.alpha = 0

This doesn't seem to work as the instance ID is different for snap2 and the one in fe.obj


This comment has been minimized.


oomek commented Feb 10, 2018

local snap1 = fe.add_artwork( "snap" )
local snap2 = fe.add_artwork( "snap" )
local snap3 = fe.add_artwork( "snap" )

foreach(k, v in fe.obj) { print("key="+k+" value="+v+"\n"); }
foreach(k, v in getstackinfos(1)["locals"]) { print("key="+k+" value="+v+"\n"); }


key=0 value=(instance : 0x00000000074B2360)
key=1 value=(instance : 0x00000000074B21A0)
key=2 value=(instance : 0x00000000074B2050)

key=this value=(table : 0x0000000006F89F60)
key=snap3 value=(instance : 0x00000000074B3010)
key=vargv value=(array : 0x0000000007448750)
key=snap1 value=(instance : 0x00000000074B30F0)
key=snap2 value=(instance : 0x00000000074B2830)

As you can see the instance IDs do not match. Is there any way to correlate those IDs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment