I cant see your post as it is not yet visible...But taking a shot in the dark, im guessing you need to use a sprite as a button and need to know how?
First we need to make a sprite and Set Window specs
//Set Window Size//
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
//Make Button Sprite
Button = CreateSprite(0)
//Set Button Size
SetSpriteSize(Button,50,50)
//Set Button Position
SetSpritePosition(Button,500,350)
//Game loop//
Do
//Check to see if Cursor is Within the sprites parameters while pointer is pressed//
If GetSpriteHitTest(Button,GetPointerX(),GetPointerY()) = 1 and GetPointerPressed() = 1
//Show evidence of button pressed//
Print("Button Pressed")
endif
Sync()
loop
This is a demonstration of what you are trying to do with setting sprites visible and back to invisible.
Click the small square in middle of screen to reveal a larger square. Click the smaller square again to hide the larger square.
//Set Window Size//
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
Global ButtonVisible = 0
//Make Button Sprite
Button = CreateSprite(0)
//Set Button Size
SetSpriteSize(Button,50,50)
//Set Button Position
SetSpritePosition(Button,500,350)
InvisibleSprite = CreateSprite(0)
SetSpriteSize(InvisibleSprite,100,100)
SetSpritePosition(InvisibleSprite,200,200)
SetSPriteVisible(InvisibleSprite,0)
//Game loop//
Do
//Check to see if Cursor is Within the sprites parameters while pointer is pressed//
If GetSpriteHitTest(Button,GetPointerX(),GetPointerY()) = 1 and GetPointerPressed() = 1 and ButtonVisible = 0
//Show evidence of button pressed//
SetSPriteVisible(InvisibleSprite,1)
ButtonVisible = 1
ElseIf GetSpriteHitTest(Button,GetPointerX(),GetPointerY()) = 1 and GetPointerPressed() = 1 and ButtonVisible = 1
SetSPriteVisible(InvisibleSprite,0)
ButtonVisible = 0
endif
Sync()
loop
Beta Test Age of Knights:https://play.google.com/apps/testing/com.CrazyProgrammerProductions.my_AgeOfKnights
Download JellyFish Dive:https://play.google.com/store/apps/details?id=com.CrazyProgrammerProductions.my_JellyFishSwim