kittiewan's Recent Forum Activity

  • Glad to help.

    Inside the draggableText drop event, after the check to see if ObjectImage is overlapping draggableText, there are two more subevents to see if draggableText.Text does or does not = an instance variable created on ObjectImage called Description. For this to work, when you create each instance of the ObjectImage, you have to set its description to the same as the matching text.

  • Thank you, thank you Tokinsom and ramones! I really appreciate your taking the time to look into this. I figured it needed some lerping. I got it to go forward pretty smoothly using vectorx, but it kept snapping back to the original X position at the height of the jump. ramones, your solutions just what I had in mind.

  • Help! Little Bunny FooFoo is hopping through the forest, but when he jumps he just goes straight up. I want him to jump towards the center of the window so that it looks like he is surging forward and then as he falls move back towards the left.

    I have no clue.

    LittleBunnyFooFoo.capx

    EDIT: I should have mentioned that the goal is to make something Canabalt-like. The player uses platform behavior with the default controls disabled, and on touch simulate jump. The scenery continuously scrolls in the opposite direction to the player.

  • Yes, definitely awesome. Initially I thought I would just be creating prototypes in C2, but it is so much quicker and more fun than my other tools that I can't stop.

  • I couldn't get your example to do anything--just shows the coin. So I created an example to show you where I think the problems you describe lie.

    RandomExperiments.capx

    At the start this example creates a random number of enemies of random colors in random locations. Then every so often (ie randomly) it:

    a) creates another enemy of random color in a random location

    b) randomly selects an enemy and destroys it

    c) have all enemies fire a bullet in random directions.

    d) randomly selects an enemy and has it shoot a bullet in a random direction.

    (EDIT: I added the case (c) where all of the enemies fire at once.)

    Based on your description of the problem with all of the enemies firing at the same time, I suspect that you are doing (c): at random intervals you are (without meaning to) selecting ALL of the enemies and having them fire bullets.

    The other problem you have is that one of your variables is not incrementing. I think you are experiencing first hand variable scope -- that is, the difference between local and global variables. This is a classic bug. Pretty much everyone runs into it at some point. Local and global variables each have their uses, so it is important to understand them.

    In the example I create two variables: LocalVariable and GlobalVariable. LocalVariable is created inside an event or event group each time it runs and is destroyed at the end of the event/event group. GlobalVariable is created outside the group or event and hangs around.

    Both variables are added to every tick and the result is displayed. But notice that since LocalVariable is created and used briefly every time Every Tick is run it only ever gets set to 1. In contrast GlobalVariable hangs around and keeps its value so when it is added to, the number it contains gets larger and larger.

  • You're welcome, but I know you agree with me that sqiddster really deserves the credit for this one.

  • I'm not 100% sure what you're asking, but the following capx has changes to sqiddster's example to use animations instead of frames.

    DonutAnimation.capx

    Just concatenate the result of the expression onto a string to create the animation name string.

  • I just posted an example drag-n-drop matching game in the arcade, with source. Although by default it checks to see if all of the objects are matched, I updated it to also include the option to end the game based on the number of tries. Look at the comments to see what to toggle disabled to switch the end of game test.

    Drag-n-drop-matching-game

    If you have any questions, just ask.

  • Hmmm. They do for me.

    EDIt: This project just uses WindowWidth and WindowHeight to position the ball sprite. When you run this project and left click, does the ball move from center to each corner of the window and then back to the center? If you change the window dimensions and run again does it still work for you? If it doesn't work, something strange is going on...

    WindowSize.capx

  • Clever solution, sqiddster! You seemed to have some duplicate frames (maybe wrong version on dropbox?) so I pasted the correct ones in place according to Joannesalfa's drawings, but in the order to match C2's rotation, as you said.

    Donut2.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just posted an example yesterday for someone showing how to get random values out of 1 dimensional, 2 dimensional and 3 dimensional arrays. Uses nested loops to insert values into the 2 and 3 dimensional arrays.

    GetRandomArrayValues.capx

  • The problem seems to be that the platform and the player fall at different rates, so the player keeps going into falling mode (instead of standing on the platform.) The player can't jump when falling, so that is the problem.

    Here is a starting point. Uses a doublejump technique to change the player vectory when the player is falling to make it jump upwards again.

    fallingPlatformJump.capx

    You'll need to do something to prevent doublejump when you aren't on the moving platform (if you don't want the doublejump always, that is.) Maybe set a boolean instance variable that allows/prevents doublejump.

    Also there is a growing gap between the player and the platform as it falls that I don't know how to get rid of at the moment.

    PS - there is a boolean on the falling platform that if set to true makes the falling platform fall only as long as the player is on it. In the example I have this turned off for both falling platforms. You can turn it on to experiment with.

kittiewan's avatar

kittiewan

Member since 13 Nov, 2010

None one is following kittiewan yet!

Trophy Case

  • 14-Year Club
  • x3
    Coach One of your tutorials has over 1,000 readers
  • x3
    Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

17/44
How to earn trophies