simple replace image on another scene
sonicm3
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
Make a game attribute, when actor 1 is touched change the value of this attribute, then actor 2 can respond to that change.
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 . . .
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"
It's the rule for actor 2.
When the attribute X equals 1 . . . . .
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 ?
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').
Thanks socks, perfect, got it working, thanks so much for your help, really appreciate mate cheers