dop2000's Recent Forum Activity

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I asked for your capx because all these destroy actions work fine for me (obviously). So there may be something wrong with your capx or C2 installation. If you share the capx that doesn't work, I can test if it works on my pc.

    Could you include all issues - with text and buttons not getting destroyed, variables not changing etc.

  • This doesn't make sense. Could you post your capx file?

  • rbailey83

    Is your layout height the same as window height? If not, you need to change it in the formula to something like WindowHeight or ViewportBottom(0)

    Also, check the Origin image point on MenuBG sprite, it should be at y=0.

    If this doesn't help, please share or PM me your capx.

  • No worries!

  • "Set velocity" should work, but you need to regulate the speed and apply it every tick, otherwise movement can be slowed down by friction, damping etc.

    I'm guessing when your character moves up a hill, it has some Y velocity, so when you apply an impulse, it adds to Y velocity, making the jump too high. You can try setting Y velocity to zero before the jump, or decreasing impulse strength if character has Y velocity.

  • Use "Physics -> Set velocity", it works instantly.

    For example to move left at speed 100, use "Set velocity x=-100, y=0"

    To move at angle: "Set velocity x=100*cos(angle), y=100*sin(angle)"

    You'll have to modify these formulas if you want acceleration/deceleration.

    Making platform game with physics may be tricky. Have you considered using Platform behavior?

    Platform with Physics don't work well together, but you can disable Platform and enable Physics when you need to interact with other physics objects.

    Or you can make two sprites - one main sprite with Platform behavior and an invisible clone sprite with Physics behavior, that will follow the main sprite.

  • You can use something like this:

    Set platform speed to abs(Touch.Gamma)*10

    Or with clamp to limit minimum and maximum speed:

    Set platform speed to clamp(abs(Touch.Gamma)*10, 100, 1000)

    The more the phone is tilted, the higher the speed will be.

    You can use a similar formula for acceleration.

    Of course you'll have to experiment a lot to get these numbers right.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 256 followers

Connect with dop2000

Trophy Case

  • 8-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
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies