AllanR's Recent Forum Activity

  • jeffige

    you can easily do it either way...

    with animations, create the object, and then Set Animation to: Choose("red", "blue", "green", "yellow")

    (assuming those are the names of the animations obviously)

    if you put 4 different objects in a family, then Create family object will randomly choose one of the types for you.

    So, if the objects are vastly different from each other - with lots of different properties, then the family way is easier.

    But it they are mostly the same, except for the animation, then that way works fine too.

  • trueicecold

    at the start of layout, set scroll.X and scroll.Y to the bottom.

    or give your player the scrollTo behavior, and place him at the bottom - then the layout will scroll to his position.

  • Andersonfrfilho

    in an action after you call function MMC, you get set a variable to Function.ReturnValue

    or use Function.ReturnValue in an expression

  • Ruskul newt

    Nice! thanks for finding that article. That's awesome and works really well.

    I tried it out in the original capx, you can see my version with the solution above here: http://www.rieperts.com/games/forum/TestsJitterDemonstration.capx

  • lovjc7

    it would help to have a test capx file to look at, otherwise you are only going to get vague suggestions...

    but what you want to do is "scale" the speed to a range of playback rates.

    so, in the Set Playback Rate action, you would set Playback rate to:

    1.0 * car.Platform.Speed / car.Platform.MaxSpeed

    obviously, that is assuming you are using the Platform behavior. Also, you would have to find what range of rates sound good with the sound effect you are using - what would be the minimum rate and what would be the maximum.

    if the minimum rate you want is 0.5 and the maximum is 1.4, then you would need to set the rate to:

    0.5 + 0.9 * Sprite2.Platform.Speed / Sprite2.Platform.MaxSpeed

    or as a general function: set playback rate to: min rate + (max rate - min rate) x current car speed / max car speed

    you might want to adjust the volume of the engine sound by scaling it in a similar way...

  • jeffige

    either you have to test if it has reached 100% in the every tick event (before you change the size)

    system > every tick: logo > set size to (self.width + 16 * 0.5, selfheight + 9 * 0.5)

    would become:

    system > every tick: logo.width less than (target width) > logo: set size to (self.width + 16 * 0.5, selfheight + 9 * 0.5)

    or you could use LiteTween: https://www.scirra.com/forum/behavior-litetween_t70700

    the nice thing about litetween is that it has many different ease in and out effects. you can also tween different properties at the same time: size, position, opacity, etc...

  • tunepunk

    ok, now I see what you are trying to do.

    But, to do a normal run cycle you can't do the entire cycle in one bounce - it takes two bounces to get back to the starting point of the cycle (the legs pass each other only once per bounce).

    If you watch the video in your link in Chrome, you can set the speed to 0.25 to slow it down - you will see that the legs are fully extended at the top of the bounce. They only cross at the bottom when one foot is on the ground. It alternates between the left and right foot on each bounce.

    So, you will need another variable (maybe called "Foot") that alternates at the end of each bounce (every time the progression gets down to zero).

    You can still probably do it with 4 frames - but it will have to be spread over two bounces.

  • tunepunk

    in addition to the "Progression" instance variable. have an "Addition" instance variable.

    so, I guess Progression would start at zero, and Addition at 1 (or however much you were adding each tick.

    If Progression >= 180 then multiply Addition by -1

    if Progression <= 0 then multiply Addition by -1 again.

    Every tick set Progression to Progression + Addition.

    If you need to speed up the bounce, just make Addition a bigger number...

    ok, after thinking about this for another minute, I was thinking that the bounce animation might look un-natural playing backward - The object would appear to start to be squished before it hits the ground. You may want to have two animations - one for the way down, and one for the way up. So, when you are calculating what frame of the animation to show (based on Progression), could would also know which animation to use based on testing if Addition is positive or negative.

  • Emac

    the swipe2.capx file has a HUD layer (with nothing on it). To make that layer stay on screen all the time, set its parallax settings to 0,0

    then you can add a tab with icons on that layer and they will stay put. (put the tab on the left side of the layout - otherwise it probably wont be on-screen)

    No, I don't have any way for people to donate, but thanks for the offer! Most of what I have learned about C2 is from helping people in the forums solve problems - so it is already a win/win situation...

  • are you wanting shadows? (sounds like a Plato story I heard a long time ago)...

    there was a tutorial not long ago that had some pretty cool lighting effects. It includes torches that you see, but I bet it would help give you a place to start...

    https://www.scirra.com/tutorials/5363/basic-but-epic-2d-lighting

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • looks like event 21 is in the right place to me.

    I would check to make sure you actually have the "crawl"&self.a animations named correctly - if the name of the animations inside the sprite does not match, then it can't play it.

  • Alexiss169

    you could add an instance variable called "State" to your player and use that as a prefix (or suffix) for the animation names...

    so you would have "idleNormal", "walkNormal", "attackNormal", etc...

    or "idleAwakening", "walkAwakening", "attackAwakening", etc...

    then any time you change the animation, just include the state variable:

    Set Player animation to "idle" & Player.State

    (obviously you would set State = "Normal" at the start, and then = "Awakening" as needed - you could have any number of other stages).

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

Trophy Case

  • 10-Year Club
  • 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
  • Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

19/44
How to earn trophies