dop2000's Forum Posts

  • Yes, you can do this with arrays if you really need to.

    But the cool thing about C2 is that it's much easier to do without any arrays.

    https://www.dropbox.com/s/3xntvn27607zg ... .capx?dl=0

  • I think what's happening is that Button object in C2 has its own cursor style and it overrides the cursor you set with "Mouse->Set cursor" event.

    You need to use CSS to set cursor style:

    #MyButton:hover {
      cursor: pointer;
    }
    [/code:3n9a7gmn]
    
    You can also change button appearance with CSS.
    See this demo:
    [url=https://www.dropbox.com/s/2hzzgt5n2kebj3i/ButtonStyled_244.capx?dl=0]https://www.dropbox.com/s/2hzzgt5n2kebj ... .capx?dl=0[/url]
    
    Tutorial:
    [url=https://www.scirra.com/tutorials/1283/css-your-buttons-and-textboxes]https://www.scirra.com/tutorials/1283/c ... -textboxes[/url]
  • You don't need an array because you already have CardFaceFrame instance variable on both CardObj and CardTargetObj.

    And there is CardUID that links instance of CardObj with instance of CardTargetObj.

    (I don't remember if I added CardUID or if you had it already?)

    All you need to do is to check if CardObj.CardFaceFrame is equal to CardTargetObj.CardFaceFrame for each pair.*

    If not equal, "win" boolean variable is set to 0.

    If all 6 cards are correct, "win" remains 1, and it means that the level is completed.

    By the way, I'm still on release 246

  • Your code doesn't work because your event 78 checks if Word contains all words!

    It basically says "if text is sensei AND arigatou AND ashita AND ..."

    It should be an OR block.

    But again, this code is extremely inefficient... You shouldn't use Text objects just to store single words.

    I fixed this event, created Letters sprite with a few animations (you should add other letters) and cleaned up your Battle event sheet:

    https://www.dropbox.com/s/85ns0e0ntz8sm ... .capx?dl=0

    Of course, there are still a lot of unresolved issues -

    1. I can drop letters on top of each other.

    2. If I used "se" letter once, I am unable to use it again. (sensei needs two letters)

    3. If I pick up letters again after I dropped them, or if I change their order, the Word.text should be recalculated. Currently a letter is just appended at the end, which is wrong.

    etc..

  • See my screenshot above -

    A sprite object in C2 can have many animations. Each animation may have many frames.

    You can have just one sprite named "Letters". When you double click it, there will be a small window with the list of animations.

    Create separate animation inside this sprite for each letter.

    When you add a sprite instance to your layout, you can select (on the left panel) which animation and frame of the sprite will be displayed.

  • I don't know any of the Japanese alphabets and have no idea which letters to choose.

    What I can say after a quick look at your project is that it's very inefficient.

    Your letters sprites are HUGE - 1367x1368 pixels each! This greatly affects performance, memory usage and project size.

    Resize them and add all to just one sprite as different animations.

    Then you'll be able to remove about 70 events from your "Letters" group!

    And your project will likely reduce in size from 26Mb to 1-2Mb.

    (image clickable)

    Also, you should name your objects correctly. You have about 150 sprites named "SpriteXXX", and a dozen of tilemaps named "Tilemap". How can you possibly find the right object in this mess?

  • Hi!

    I have many years of programming experience and quite good at troubleshooting.

    I can help to debug, optimize and fix your code in Construct 2 or Construct 3 project, or provide an advice if you are stuck with a complex task.

    I am also available to work on small projects (up to several days).

    My email: doperst2006 (at) gmail.com

    EDIT: I am currently working on a large game and temporarily not taking on new projects.

    Stan.

    Check out my super awesome game Doptrix, available on Google Play!

    If I've helped you on this forum and you want to buy me a cup of coffee, you can do it here.

  • You need to provide more information - instructions on how to play (not all of us here know Japanese ), how the game is supposed to work, what exactly is the problem?

  • There was another post about C2 running really slow:

    Surprisingly, all people who reported this have really good computers (top i7 cpu, many Gb of RAM, fast SSD etc.)

    I run C2 on two fairly old laptops with much lower specs and don't have any such issues .

  • Sure, next time I'm in the US

    Glad it helped!

  • I guess you need a server with a database of registered users, then use AJAX to communicate with this server.

    There may be ready-to-use solutions/plugins for this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • , red dot shares 1px with the Bloc, it's enough to be considered overlapping.

    Here is the final fixed version, still with only 6 events:

    CAPX

    EDIT 2 years later: If anyone stumbles upon this post, here is a much better version:

    dropbox.com/s/8jbp3p7zlra5355/WalkAroundWalls2.capx

  • ,

    You know what, scrap my previous comment. Scrap everything!

    Here is an extremely simple solution:

    https://www.dropbox.com/s/5u73vndufc28r ... .capx?dl=0

    Yes, the enemy face hits the wall in corners a little bit, but it's a small price to pay for the simplicity! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Yeah, like I said this method is not very "universal". One small change in your latest version and the enemy sprite gets stuck:

    I think this idea might work better (inspired by maze solving algorithm) -

    Create an invisible square block (green) under each tile, slightly bigger in size.

    Move Enemy sprite along the edge of this green block, from corner to corner (clockwise).

    When Enemy is overlapping next block - "jump" to the next block and continue moving in straight line.

    If Enemy is overlapping two other blocks, pick the block which is to the left from the current movement line, and jump to this next block.

    This can actually be done without the green blocks, it's just easier to explain with them.

    Don't ask me for a demo, I've spent too much time on this already