show image

sonicm3sonicm3 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

  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2016

    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

  • SocksSocks London, UK.Member Posts: 12,822

    @sonicm3 said:
    the image I created is JPG.

    Try and work with PNGs, JPG images are compressed and therefore compromise image quality.

  • sonicm3sonicm3 Member Posts: 141

    Ok thanks very much.

  • sonicm3sonicm3 Member Posts: 141

    Hi socks, when you say change game.SHOW to true, where is this field located?

  • IceboxIcebox Member Posts: 1,485

    @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.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    @sonicm3, in the example @Socks describes "Show" is a custom attribute you'd need to create yourself.

  • SocksSocks London, UK.Member Posts: 12,822

    @jamie_c said:
    @sonicm3, in the example @Socks describes "Show" is a custom attribute you'd need to create yourself.

    Whoops ! Yes, like Jamie says, 'SHOW' is simply a name for an attribute you make yourself, you can call it anything you like.

  • SocksSocks London, UK.Member Posts: 12,822

    @sonicm3 said:
    Hi socks, when you say change game.SHOW to true, where is this field located?

    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.

  • GnarlyGnarly canadaMember Posts: 840

    @sonicm3 said:
    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.

    You could use destroy actor to no show.
    Spawn hint actor when you want to see it.

Sign In or Register to comment.