evyatron's Recent Forum Activity

  • I'm using the Free version.

    • I've put 10 Sprite instances on the screen.
    • Added the Fade behavior to the sprite
    • Now I wanted for it to not start automatically for all the instances together, so I selected all of them and changed the property.
    • Once I did that C2 crashed. If I change the behavior instance by instance it works alright.
  • Ok how I ended up doing this (and now it works great) is this:

    • define a new RotateTo instance variable
    PlayerBox on Platform Jump
        Player.IsMirrored? PLAYER_JUMPING_ANGLE : -PLAYER_JUMPING_ANGLE
    
    PlayerBox on Platform Fall
        Player.IsMirrored? -PLAYER_JUMPING_ANGLE : PLAYER_JUMPING_ANGLE
    
    PlayerBox on Platform Landed
        Set Player.RotateTo = 0
        Set Player.Angle = 0
    
    System.Tick
        Rotate Player PLAYER_JUMP_ROTATE_SPEED*dt toward Player.RotateTo 
    

    Thanks for the help!

  • What I ended up doing is creating a new Layer just for the text, giving it Parallax 0,0 and positioning the text in the top left corner of that layer, without any Anchor behavior.

    Hopefully that's the correct way to go about it.

  • Thanks for the info!

    I have to admit I didn't FULLY grasp the concept of the dt, but I'm going with you here. This is what I have now, however it's still not working properly! Now when I jump it jitters :)

    If I remove the Clamp then it doesn't jitter, but it goes above the 15 degrees (obviously).

    Also note (don't know if it was clear from my previous screenshot)- when the play falls down I want it to be in he opposite of that degrees. I mean that if when jumping I make it go to -15, then when it falls it should be 15, and then settle on 0 when it hits the ground.

    So here's the updated Events Sheet, thanks for the help!

    http://i.imgur.com/x2o08.jpg

    <img src="http://i.imgur.com/x2o08.jpg" border="0">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Working on a Platform game, I have the Player Sprite.

    What I want to do, is rotate it while it jumps, then bring it back to 0 when it reaches the ground.

    I almost got it to work, but the problem is that when it reaches the ground it "shakes" a bit until it settles down. Any idea what I'm doing wrong?

    Thanks!

    http://i.imgur.com/Tlifu.jpg

    <img src="http://i.imgur.com/Tlifu.jpg" border="0">

  • I though what I was trying to achieve is basic, but I'm not getting to it.

    I have a Platform game and I want the text to always show in the top left corner of the VIEWPORT, so if I jump or move left or right, it will remain static.

    I thought the "Anchor" should do the trick, but if I apply that behavior the text has an "animation" and when I jump it doesn't stay static (but rather it takes time to "correct" it's position).

  • the "N" in "nth" is a number variable.

    to say "nth element" is to say "any element that's in the index N".

    N also means the number of items in a set. So if I have 10 instances of Object, N=10.

    like TELLES0808 reply, it could mean the last item (since N literally is the number of items), but it could also mean "any number between 0 and N" (like in our case).

  • Thanks guys!

    What I ended up doing is:

    Event: Obj.Count >= 10

    -Sub Event: Pick All Obj

    --Sub Event: Pick nth 0

    Because this is done in the same timing event used to create the objects, if I did the "pick nth(0)" directly it returned the Object I just created. Does that make sense?

    Is what I did OK, or did I over complicate it?

  • Hello everyone,

    I'm new to Construct2, and I'm trying to create the following behavior:

    • Create a new object each 0.5 seconds
    • If I've reached 10 objects on screen, remove the first one.

    what I have:

    • System.Every 0.5:               Create object Obj

          System.Obj.Count >= 10

          System.Pick-nth-instance Obj(0)     Obj.Destroy

    I hope I wrote it in an understandable way.

    What I'm trying to do is get the first Obj instance and simply destroy it.

    Thanks!

evyatron's avatar

evyatron

Member since 6 Sep, 2012

None one is following evyatron yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies