GameSalad

Howdy, Stranger!

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

simple replace image on another scene

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

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

  • sonicm3sonicm3 Posts: 140Member

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

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

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

    It's the rule for actor 2.

    When the attribute X equals 1 . . . . .

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

    @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 Posts: 140Member

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

Sign In or Register to comment.