GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

show image

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.Posts: 12,822Member
    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.Posts: 12,822Member

    @sonicm3 said:
    the image I created is JPG.

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

  • sonicm3sonicm3 Posts: 140Member

    Ok thanks very much.

  • sonicm3sonicm3 Posts: 140Member

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

  • IceboxIcebox Posts: 1,483Member

    @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 Posts: 5,549Member

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

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

    @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.Posts: 12,822Member

    @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 canadaPosts: 840Member

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