How to change an image on touch?

FirstDanFirstDan Member Posts: 208
edited April 2012 in Working with GS (Mac)
Hi all

Think I'm having a bad day today :(, can't seem to do the following;

I have an actor when you touch inside, i want the image to change and when you touch it again i want it to with back to the original.

Actor -
--rule when touch is pressed inside
--change image to image 1
--change att: imgtype to 1

rule when touch is pressed inside
--and imgtype = 1
--change image to image 2

thanks all

Answers

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Yep, what T said. That method can be used for turning the music/soundFX on/off.
  • FirstDanFirstDan Member Posts: 208
    thanks chaps, i did as advised but when I run my game, the original image is not there, defaults to an actor with no image

    much appreciated.
  • FirstDanFirstDan Member Posts: 208
    @tshirtbooth - seems like there is a bug within my game, your logic deffinatly works, thanks so much
  • FirstDanFirstDan Member Posts: 208
    @tshirtbooth, for some reason the change attribute self.image was conflicting, to fix;changed the image using the CHANGE IMAGE behaviour
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    @FirstDan - you need to be sure to put the .png in the change attribute as well.
  • DimensionGamesDimensionGames PRO Posts: 993
    @FirstDan - you need to be sure to put the .png in the change attribute as well.
    I thought they got rid of the need to use .png in an earlier version?
Sign In or Register to comment.