dop2000's Forum Posts

  • msha91

    Oddly, I'm only getting this error in Chrome, in other browsers it works fine.

    In event 8 move "Remove all physics joints" above the "Sprite set physics disabled".

    This should fix it.

  • Thanks, Colludium !

    I'm so glad I found this post, it saved me hours of work converting all text objects to spritefonts!

    Can confirm, "Basic" option fixes the problem with Cyrillic characters.

  • You are doing something wrong, probably picking wrong set of enemy instances.

    If you change your code to something like this:

    Enemy is overlapping DetectionSprite -> Enemy set speed to 100

    else -> Enemy set speed to 10

    then only enemies overlapping DetectionSprite will get speed increase.

    You can do the same without the sprite. For example:

    System: Every 1 seconds
    System: For each Enemy
        System: Compare two values: distance(Enemy.x, Enemy.y, Player.x, Player.y)<200 -> Enemy set speed to 100
        Else -> Enemy set speed to 10
    [/code:26nq1shi]
  • I'm not sure how positioned audio works, I thought it adjusts the volume for left and right channels (for stereo effect). But I might be wrong.

    Anyway, here is an example of how you can change volume depending on the distance between two objects:

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

  • [quote:1zukx38c]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, ","))), ",")

    Is this animation list will be filled by the string variable "category3" and the tokencount will be separate this information and randomize them? Is that correct?

    animationsList is a text variable, you can fill it from Category3 variable or in the future from your DB.

    That long formula selects a random animation name from a list of names separated by commas. See tokenat() and tokencount() expressions in the manual.

    [quote:1zukx38c]

    Simple points. For example: frame 1 worth 3 points, frame 2 worth 1 point, 3 worth 7 points...

    Ok, but you will have at least 100-200 different frames. How your game will know how much points each frame worth? Where will you get this information from?

  • Fixed:

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

    But do you really need physics? If the "rope" is rigid and the object is not interacting with other physics objects, then this kind of movement can be done without physics behavior:

    https://www.dropbox.com/s/05ir5z6hvxjy4 ... .capx?dl=0

  • 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

  • Try Construct 3

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

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

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