dop2000's Recent Forum Activity

  • Nice demo, Bruno!

    I added drag&drop:

    https://www.dropbox.com/s/9cdcj8omeurgs ... .capx?dl=0

    It works, however the dragging distance and speed needs to be limited, otherwise the chain can break.

    I wonder if it's possible to make an unbreakable chain?

    msha91

    I see that's not exactly what you wanted. Oh, well..

  • 2. You need to decide how you want to store these lists of categories/animations - you can read them from a text file (csv, xml etc) or load as JSON into an array or dictionary.

    Or you can simply create 6 text variables:

    category1 = "anima1,anima3,anima5"

    category2 = "anima2,anima4"

    ...

    3. When player selects a category, you can choose a random animation from a comma-separated string of animations using this expression:

    animationsList = category3 // for example

    animationName = tokenat(animationsList, floor(random(tokencount(animationsList, ","))), ",")

    Then set this animation to a sprite and choose a random frame:

    Sprite1 set animation to animationName

    Sprite1 set frame to floor(random(Sprite1.AnimationFrameCount))

    Repeat the same steps for the seconds sprite.

    4. How do you assign a value to selected frame I don't know, you need to give more information about these values. What are they? Are they different for each frame? Where are you planning to get these values from?

  • You can insert newline after 44 characters using left() and right() expressions, but what if next line of dialog needs to have newline at a different position, or two newlines?

    Here is much easier solution - mark line breaks with some unused symbol, for example "^":

    Input set Text to "The quick brown fox jumps over the lazy dog.^The quick brown fox jumps over the lazy dog.^The end."

    Then use this code to replace ^ with newlines:

    Output set Text to replace(Input.text, "^", newline)

  • 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

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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?

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 250 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