RetroSpock's Recent Forum Activity

  • Im going to assume drag and drop letters onto boxes.

    Letter on collision with box

    ->box compare instance variable "filled"=0

    -->letter set drag and drop to disabled

    -->letter set position to box

    -->box set variable "filled" to 1

    This assumes letters and boxes are instances from two separate objects.

    Letter frame 0 = A, 1 = B, etc

    Hi Newt, thank you for replying to me.

    I'm not sure what the frame is that you're referring to but I'll assume that's right? I created a new sprite object for each letter and gave them the name Letter_R_Small etc.

    As for the selection, it's click based at the moment but I'll ultimately want it touch based since i'm gonna put it on my phone for my Son to use.

    On Object Click > Letter_R_Small, move to Pos xxx, yyy, and so on.

  • I have managed to do the following logic:

    Global Variables:

    Empty_Box_1

    Empty_Box_2

    Empty_Box_3

    Letters:

    Letter_E_Small

    Letter_D_Small

    Letter_R_Small

    Letter_A_Small

    Letter_M_Small

    [Letter_R_Small Group]

    To move the letter R to Empty_Box_1:

    If Empty_Box_1 = 0 > Set Position to XXX, YYY > Set Empty_Box_1 to 1

    To remove the letter R from Empty_Box_1:

    If Empty_Box_1 = 1 and Letter_R_Small.X = XXX and Letter_R_Small.Y = Empty_Box_1.X and Empty_Box_1.Y >

    Letter_R_Small set Position back to original XXX, YYY and set Empty_Box_1 to 0.

    This is just one letter, one box. Is there a better way I can do this for all 26 letters across variable sized Empty_Box_x's depending on the word length?

    It'll take forever to do it this way I think, surely there's a more dynamic and less 'code' way of doing it?

    Edit: Image

  • Hey guys,

    I'm trying to make a word game for my Son to help him with his spelling.

    I have 4-5 letters to choose from and I have the length of the word as a (visually) empty box for the letters.

    Think of it like Scrabble a little bit; One letter per square.

    Logically (in pseudo code) I can:

    If box1 == empty {
      put letter in this box
    } else if box2 == empty {
     put letter in this box
    } else if box3 == empty {
     but letter in this box
    }
    
    if box1 box2 box3 == full && correct == false {
      reset the letters
    }[/code:23bkjbk7]
    
    But I don't know the best way to do this using Construct 2.
    
    Am I best off using containers, or arrays, or maybe variables?
    
    Thanks!
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I figured it out!

    Cursor is over Sprite: Action: Sprite > Set Size.

    Copy and paste the whole event, right click the new one, invert and set the size back to the default size.

  • Hey guys, I'm trying to increase the size of a sprite slightly on mouse-over, and then revert back to it's original size once my mouse is off. I tried Cursor is over sprite > Sprite > Set Size 250, 250... This worked, but it didn't go back to 200, 200.

    I tried setting another action to Set Size to 200, 200 but that didn't work either.

    Thanks!

RetroSpock's avatar

RetroSpock

Member since 17 Apr, 2017

None one is following RetroSpock yet!

Trophy Case

  • 7-Year Club
  • Email Verified

Progress

8/44
How to earn trophies