dop2000's Recent Forum Activity

  • —

    https://www.dropbox.com/s/gdikt3ylg7fbb ... e.zip?dl=0

    I recommend LiteTween though, it's much better then this one.

    viewtopic.php?t=70700&start=0

  • I uploaded it to my dropbox:

    https://www.dropbox.com/s/gdikt3ylg7fbb ... e.zip?dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you want to put JSON string directly into the Load action, it needs to be in quotation marks, and all " inside it should be doubled.

    Try this:

    "{""c2array"":true,""size"":[1,1,1],""data"":[[[0]]]}"
    [/code:1sp0ubye]
  • You can make a sprite with 2 different frames and animation speed=0.

    When flipping controls, change animation frame from 0 to 1, then back to 0.

    Or you can apply an effect to the background sprite/layer.

  • There are many ways to alter horizontal speed when jumping. How you want to do it it's up you.

    In your event #2 where you reset velocityY before applying impulse, you can set X component of the velocity to one of these values:

    1. Player.Physics.VelocityX*0.75

    this will decrease horizontal speed by 25% for any jump.

    2. Player.Physics.VelocityX+(Player.Physics.VelocityY/2)

    this will decrease the speed if ball is rolling up, increase the speed if ball is rolling down, have no effect if ball is rolling forward.

    The bigger is the slope angle, the more is the increase/decrease in speed.

    3. Player.Physics.VelocityX-abs(Player.Physics.VelocityY/2)

    this will decrease the speed if ball is rolling up or down

    4. Player.Physics.VelocityX+min(Player.Physics.VelocityY/2, 0)

    this will decrease the speed only if ball is rolling up

    Note, that if hill angle is very steep, the ball can actually stop or move backwards on jump. You can add clamp() to these formulas to prevent this from happening. For example:

    Player.Physics.VelocityX+clamp(Player.Physics.VelocityY/2, -100, 0)

    Of course you can choose different values instead of "/2" and "*0.75"

    And you'll probably need to make adjustments to some parts of your layout as the length of jumps will change.

    One more thing - don't use huge sprites for background, use TiledBackground.

  • You can define two image points on both sides of the player, just below its bottom edge.

    But yeah, overlapping at offset is a better way of doing this, as long as you get the math right.

  • All form controls objects (Button, TextBox, SliderBar etc.) are different from other C2 objects.

    They are rendered above all layers, they intercept mouse and keyboard events, they have issues with scaling etc. It looks like these objects are not "native" C2 objects, that's why I don't like using them in games.

  • It's not a bug

    Mouse events don't work with Button object, as most Keyboard events don't work with TextBox object.

    Instead of "Mouse->On object clicked" use "Button-> On clicked".

  • If the ball is rolling up the hill it can go a certain distance up the hill. If the ball is jumping while going up the hill it can go further than if it was just rolling.)

    I see this on the video, thanks. But I don't understand your problem.

    Do you want the ball to go further when it's jumping? (as it does now)

    Or do you want it to move the same distance, no matter if it's jumping or rolling?

    Or should the distance be actually shorter when the ball is jumping?

  • Your code in the first comment was more correct (or less wrong).

    "On created" is a triggered event, it's triggered only once. So you should not nest repeating events like "Every X seconds" under "On created", this will never work.

    The best solution would be to add Timer behavior to your SmallDestroyer.

    Also, instead of "Create" action you can define an image point where you want to shoot bullets from and use "Spawn":

    SmallDestroyer on created -> SmallDestroyer start Timer "Shoot" for random(0.2, 0.4) (Once)
    
    SmallDestroyer on Timer "Shoot" -> SmallDestroyer spawn BlueProjectile from Imagepoint "shootPoint"
                                    -> SmallDestroyer start Timer "Shoot" for random(0.2, 0.4) (Once)
    [/code:1tya4kf8]
    
    That's it. Each Destroyer will be running its own Timer, and the Timer will be restarted for a random time after each shot.
  • Physics objects behave like real-life objects. If a real-life ball is rolling forward and you apply impulse (hit it from below), the ball will jump up and forward, because it has forward momentum.

    So if you don't want it to move forward when jumping, I think you need to remove its horizontal velocity, set it to 0.

    It's only a guess, since I don't have your capx to test.

  • It works for me. Goes to main menu layout, not freezes.

    However, I suggest you make these changes:

    1. Replace "Is touching Home" with "On tap gesture on Home".

    "Is touching" is a continuous condition, it triggers ~60 times per second, which is not good for buttons.

    2. Since you are resetting global variables, no need to set individual variables to 0, you can remove all such actions (set OrangeMark=0 etc.)

    3. No need for "Restart layout", since you are changing layout.

    So basically your event should look like this:

    On tap Home

    Home is visible

    ...............Reset global variables

    ...............Go to MainMenu

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 280 followers

Connect with dop2000

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

30/44
How to earn trophies