Clicking One Actor to Change Image in Another!
Hey Guys,
I have a lot of questions lately, don't mind me! This is a hard question it seems, I have found a few ways to do it, but it seems like there is so much to do it for it, that there has to be an easier way without adding unnecessary things.
Basically, I have letters, each is an image, you tap that letter, it will add that letter to an attribute, and I also want it to change the image of a tile to the image of the tile with that letter. The problem I have is, how do I tell the tile to trigger when another actor is pressed, and how can I tell it to know which letter in the word it is. The words can be any size from 0 - 5 letters.
Is there a way to pick out a character in an attribute, like for the first tile, tell it to pick out the first character in the attribute and then have 26 rules, if a then change image to a... etc?
Thanks a bunch,
Matt
I have a lot of questions lately, don't mind me! This is a hard question it seems, I have found a few ways to do it, but it seems like there is so much to do it for it, that there has to be an easier way without adding unnecessary things.
Basically, I have letters, each is an image, you tap that letter, it will add that letter to an attribute, and I also want it to change the image of a tile to the image of the tile with that letter. The problem I have is, how do I tell the tile to trigger when another actor is pressed, and how can I tell it to know which letter in the word it is. The words can be any size from 0 - 5 letters.
Is there a way to pick out a character in an attribute, like for the first tile, tell it to pick out the first character in the attribute and then have 26 rules, if a then change image to a... etc?
Thanks a bunch,
Matt
Comments
things your game will have to monitor
Words
currentLetter
activeTile
===
things the letterButton will have to monitor:
myLetter … you have to set this one
and Do
when pressed
--when currentLetter = space
--change currentLetter To: myLetter
===
things your tileActors will have to monitor
self.Image … aha that is built in!
myID … so I will know when it my turn to be active … you have to set this one
and Do:
when myID = activeTile
--change: self.Image to currentLetter image
--add the the currentLetter to Words
--change the currentLetter to a space
--change the activeTile To: activeTile+1
===
of course gameAttribute maxLetters/Word might help with a tile rule when myID = maxLetters/Word … √word
@};- MH
"Bubble"..game.currentLetter..".png"
"Bubble" … tells computer this is text in name
.. tells computer more to follow
game.currentLetter … tells the computer this value is appended to the text string (you select this one)
.. tells computer more to follow
".png" … tells the computer this is appended to the text string
once you write for one letter … use it for all!
@};- MH
Thanks!
or just email it to: myName @ gmail
@};- MH