hmm. scrap what i said above since there appears to be an issue on further testing:
oops. i caught the mistake. this is offered as alternative to dealing with overlapping sprites and/or those that should be (invisible? and) "inactive":
// set window properties
SetWindowTitle( "ActiveInactive" )
SetWindowSize( 1280,720, 0 )
SetWindowAllowResize( 1 )
// set display properties
SetVirtualResolution( 1280,720)
SetOrientationAllowed( 1, 1, 1, 1 )
SetSyncRate( 30, 0 )
SetScissor( 0,0,0,0 )
UseNewDefaultFonts( 1 )
this = CreateSprite(0) : SetSpriteSize(this,128,128)
SetSpritePosition(this,200,200)
Active = 1
SetSpriteGroup(this,1)
that = CreateSprite(0) : SetSpriteSize(That,128,128) : SetSpritePosition(that,248,248)
SetSpriteColor(that,255,0,0,255)
SetSpriteGroup(that,Active)
do
If GetPointerPressed()
Active = -Active
If Active = 1 then SetSpriteGroup(This, 1) else SetSpriteGroup(This,2)
Endif
Print( "Click to make the white box Active/Inactive / Hover over Sprites " )
Print( "Active: " + STR(Active))
Print( "Hit: " + STR(GetSpriteHitGroup(1,GetPointerX(), GetPointerY() )) )
Sync()
loop
the red box should always stay "active". the white, not so much
i don't work in studio so hoping this helps?