show image
sonicm3
Member Posts: 141
how would I have an actor when pressed show an image on screen then when unpressed remove the image?
Its kind of like a hint button to show where the loot is in the game, the image I created is JPG.
Comments
Button Actor:
When touch is pressed
-- change game.SHOW to true.
Otherwise
--change game.SHOW to false.
. . . . . . . . .
Image Actor:
When SHOW is true
--change self.colour.alpha to 1
Otherwise
--change self.colour.alpha to 0
Try and work with PNGs, JPG images are compressed and therefore compromise image quality.
Ok thanks very much.
Hi socks, when you say change game.SHOW to true, where is this field located?
@sonicm3 i recommend you watch GS logic series on youtube by GS guru , slow down a bit , watch several tutorials, get a clear understanding of how the engine works then try to use that knowledge to create the game you want , this way you will be able to create what you want easily.. ( im not saying dont ask ) but it will help you alot! you will figure out how easier it is to do stuff around.
@sonicm3, in the example @Socks describes "Show" is a custom attribute you'd need to create yourself.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Whoops ! Yes, like Jamie says, 'SHOW' is simply a name for an attribute you make yourself, you can call it anything you like.
Make a game level attribute, call it whatever you like, once made you can access this attribute from the pull down menu (go to 'attribute') for the rule's condition.
You could use destroy actor to no show.
Spawn hint actor when you want to see it.