simple replace image on another scene

sonicm3sonicm3 Member Posts: 141

Hi,

I have actor 1 on scene 1
I have actor 2 on scene 2

I want to click actor1 on scene 1 and it needs to change the image of the actor2 on scene 2.

Can anyone advise please on the best way foward?

Thanks so much indeed for your help.

Comments

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

    Make a game attribute, when actor 1 is touched change the value of this attribute, then actor 2 can respond to that change.

  • sonicm3sonicm3 Member Posts: 141

    thankyou so much, im very new to gamesald, do you have an example.
    would you be so kind to give me an example to get me started.
    i presume i create a rule is touched actor1 is pressed, change attritube > GAME > then something...

    and also what else would i need to do to actor 2 in scene 2?

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

    @sonicm3 said:
    thankyou so much, im very new to gamesald, do you have an example.
    would you be so kind to give me an example to get me started.
    i presume i create a rule is touched actor1 is pressed, change attritube > GAME > then something...

    and also what else would i need to do to actor 2 in scene 2?

    Make a game attribute, let's use a Boolean attribute, let's call it 'X'

    Actor 1

    When touch is pressed
    --Change X to 1

    Actor 2

    When X = 1
    --Change image to . . .

  • sonicm3sonicm3 Member Posts: 141
    edited April 2016

    thanks friend.

    I got the part of actor1

    Actor 1

    When touch is pressed
    --Change X to 1

    but, on actor 2, how would i accept the incoming command.
    Do i need to create a rule, or a constain attribute, whats the full command i would need?
    like what command is "when x-1"

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

    @sonicm3 said:
    like what command is "when x-1"

    It's the rule for actor 2.

    When the attribute X equals 1 . . . . .

  • sonicm3sonicm3 Member Posts: 141
    edited April 2016

    for the first actor i have

    when ALL of the following happens
    touch is pressed
    DO
    change attributes
    SET > game.X to 1

    and i made a new boolean to 1 too and ticked it.

    so i presume thats right?

    ///

    actor 2..

    IF game.x is TRUE

    change image ?

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

    @sonicm3 said:
    and i made a new boolean to 1 too and ticked it.

    If you tick the boolean you will change its value, it will no longer start out 'false' (or '0'), ticking it will make it 'true' (or '1').

  • sonicm3sonicm3 Member Posts: 141

    Thanks socks, perfect, got it working, thanks so much for your help, really appreciate mate cheers

Sign In or Register to comment.