Spot the Difference - OOP problem
Hello all! I have specific problem and need some help - our company is interested in GameSalad and want to buy premium account in the near future.
I wanted to create first small demonstration for our company - Spot the Difference. I have 4 diferences on the scene and indicator (how many differences left - using Replicate behaviour, it works fine). I have invisible red actors on the scene (visible with opacity 0 in fact). When I spot the difference (touch) I would like to raise the opacity to 0.25 (difference has been spotted).
I created Actor "Difference1". I told him... when touch is pressed and self.opacity isn´t 0.25 (why? because don´t want to repeat this rule after next touch) then self.color.alpha to 0.25 and then change attribute "differences" -0.5 (not -1 because I will have 2 instances on the each actor to show up).
It is HTML 5 project (I know, I should not use blending, alphas etc. but I think it should work in GameSalad editor - I saw whole tutorials on YouTube Cookbook). When I programmed 4 actors I want to drag two instances of each actor on the scene.
Then I really dont understand what GameSalad doing. If I click on the second instance of actor "Difference1"... both instances of actor shows (thats correct!). If I click on the first instance of the actor "Difference1"... it shows only himself! The worst is when I click on the first or second instance of the actor "Difference2" I see one instance of "Difference2" AND ONE INSTANCE OF "DIFFERENCE1"! I absoulutely don´t know how is this possible? Those actors don´t have any connection to each other!! Am I really stupid or there is OOP bug?
1 more question please:
1) If I have atribute under "Actor 1" and I want to change his atribute via "Actor 2" how can I do this? Expression editor shows only "Game", "Device" or "Self".
Many thanks for any help!
Daniel
I wanted to create first small demonstration for our company - Spot the Difference. I have 4 diferences on the scene and indicator (how many differences left - using Replicate behaviour, it works fine). I have invisible red actors on the scene (visible with opacity 0 in fact). When I spot the difference (touch) I would like to raise the opacity to 0.25 (difference has been spotted).
I created Actor "Difference1". I told him... when touch is pressed and self.opacity isn´t 0.25 (why? because don´t want to repeat this rule after next touch) then self.color.alpha to 0.25 and then change attribute "differences" -0.5 (not -1 because I will have 2 instances on the each actor to show up).
It is HTML 5 project (I know, I should not use blending, alphas etc. but I think it should work in GameSalad editor - I saw whole tutorials on YouTube Cookbook). When I programmed 4 actors I want to drag two instances of each actor on the scene.
Then I really dont understand what GameSalad doing. If I click on the second instance of actor "Difference1"... both instances of actor shows (thats correct!). If I click on the first instance of the actor "Difference1"... it shows only himself! The worst is when I click on the first or second instance of the actor "Difference2" I see one instance of "Difference2" AND ONE INSTANCE OF "DIFFERENCE1"! I absoulutely don´t know how is this possible? Those actors don´t have any connection to each other!! Am I really stupid or there is OOP bug?
1 more question please:
1) If I have atribute under "Actor 1" and I want to change his atribute via "Actor 2" how can I do this? Expression editor shows only "Game", "Device" or "Self".
Many thanks for any help!

Daniel
Comments
click > layers > and the layer actor2 that you want to changeAttributes is on > actor2 and select the attribute to change.
for your 1st question: my mind is too tangental today! 8-}
giving your problem a brief visualization:
IMO … worthwhile looking at Tshirtbooth's videos Table Videos
add a Table to your project: … ex. name: T-images
# row = # of different sets of images to match and label the rows (how-to in video)
# columns = 1 less than the number of imagesActors you want to display (2 of the images will be the same)
with the correct imageName in the 1st column … in-corrects in the next ones.
Actors in your scene:
Rule: when
self.image = tableCellValue( game.T-Images ,"rowLabel",1)
--do this
Otherwise:
--do that
know your are going to have to really tweak those simplistic instructions … but it is a starting place
@};- MH