How do I make it work again?

  • No, instance variables. You have them on some other sprites, for example your PlayerBattle sprite has instance variable "health".

    Instance variables is a powerful thing, you should use them more.

    Create instance variable "startX" and "startY" on the Letters sprite. Set them to each letter's position on start of layout.

    This will allow you to return any letter instance to its original position when needed. Say, when it's dropped not on the grey box.

  • [quote:1ewgcgdd]You can try something like this:

    CODE: SELECT ALL

    Word set text to ""

    Sprite133 -> boolean variable isOccupied set // this will pick all occupied boxes

    For Each Sprite133 order by Sprite133.UID // This will loop through occupied boxes

    Sprite133 is overlapping Letters // This will pick a letter on each box

    Word append text Letters.AnimationName // and add this letter to Word

    flickr.com/photos/14794474@N07/24091283517/in/dateposted-public

    Does it look like this? Tried it and doesn't work.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Almost..

    Events 17,18,19 should not be under "On Start of layout".

    I recommend you create a function "UpdateWord" and move these events to the function.

    Call this function after any letter is dropped.

  • Okay it worked.

    [quote:3sgu1a4n]Word append text Letters.AnimationName // and add this letter to Word

    When I put this, I remove the letter from grey box, and put it again, it doubles the word. For example I put "se" to grey box, it display "se", then I put it again, it shows "sese". I removed it (the quote) and it worked.

    About the function, where should I call it?

    If I put it like this

    goo.gl/7ys6bw

    It does this

    goo.gl/xqxEyg

    It doesn't append words but rather replace it.

  • Move "Function call" after "Sprite133 Set isOccupied=true".

    And remove "Word append.." from this event, because this is done with the function now.

    Edit: actually, you should add another "Function call" in the Else event, after "Letters1 set position to (startY, startY)"

  • [quote:mszvmw7m]Then if the letter is dropped on an occupied grey box, return it to (startX, startY) position.

    flickr.com/photos/14794474@N07/27181598989/in/dateposted-public

    Am I doing it right? I tried every position to put the boolean, but it still overlaps.

  • Change your events to this:

  • Thank you. I tried your example and put it in my project, but, when I removed it one by one, the last letter didn't get re-calculated. I mean the last letter to be removed from the grey box, did not remove the appended word.

  • It's getting too difficult to follow.

    Could you share you capx?

    Also, can I ask - did you develop this game from scratch? Or did you use someone else's demo/game template?

    Because some of the code in your project is quite advanced, and yet the questions you are asking are very basic. I'm confused.

  • Yes, I did develop this game from scratch. I just follow some tutorials I found on Youtube.

    goo.gl/kAb4jh

  • Ok, this one was easy. Just move "Word Set text" to the start of the function:

  • Seriously?! OMG! Sorry for troubling you! I didn't know it was that easy.... T-T

    You saved me!! Thank you

  • I think this post I'm going to post is kind of related.

    Here goes.

    If you notice my game, there is a hint button. Every time I tap it, some hint shows up or something like that.

    What my problem is now, can a single button or in this case sprite, show different hints every time it is pressed? Like when I press it once, it shows the romanize letters then when I press it again, it shows the appended text, like making it visible.

    Is there any way to do it?

    Here is the updated version

    goo.gl/hc6ZkU

  • Easy way - use choose("abc", "def", "ghi","jkl",....) to randomly select one of text messages.

    You can add a text object HintText, and do something like this:

    HintText set text to choose("abc", "def", "ghi","jkl")

    Wait 5 seconds

    HintText set text to ""

    If you want your hint messages to not repeat or if you want to highlight letters on your board or something like that - this will require more work.

  • Not to repeat I guess. What I'm trying to do now is

    1. When I hit the hint button, the letters, the English letter, will reveal it self by increasing the opacity to 100 and after a few seconds, the opacity set to 0.

    2. When I hit the hint button again, something else will pop up, not the English letters, but the Word text object will be visible.

    Is the process going to be complicated?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)