Noob question

This forum is currently in read-only mode.
  • Hey, I found this by pure chance and its just the type of thing I've been looking for.

    After messing with control, reading and doing tutorials, surfing the source forge documentary, and sifting though forums, I can't seem to figure out how to turn a platform sprite to the left without flipping it upside down.

    The things I've tried:

    Checking auto mirror

    On control press "move left" => Rotate sprite (and sprite animation) 180

    Messed with angles under the animation tab

    On control press "move left" => Create sprite L on image point 1

    Destroy sprite R

    Creating multiple animations

    And lots more, none seems to work right. I've been working with control for a few days, mainly just learning the loops. But this seems like its a fairly important thing to include. Deadeyes platform school was helpful, but the sprite in it didn't flip either. I'm running windows vista 64, with an nvidia geforce 6600 pixel shader 3.0 (I think, I know its at least 2.0)

    I thought it might be a compatibility issue, so I tested things around on a laptop running windows XP, and an Intel graphics card (not sure if it even has PS) and I still couldn't solve my problem. I suppose this post didn't need to be so big, but I figured it's better than having to clarify myself over and over.

  • Auto mirror should be checked, then you can use the "Compare" condition under system to check the X speed of the object, like this:

    +Sprite[Platform].VectorX greater than 0
        -Sprite: Set angle to 0
    +Sprite[Platform].VectorX less than 0
        -Sprite: Set angle to 180[/code:1lxe7j41]
    [url=]Here's a CAP file to illustrate this[/url].
  • Thank you. It works on your example, but I must be doing something wrong, cause it wont work for me. I have one more question whats going wrong in this cap, that it wont let me go to level 1?

  • It's going to the level 1 layout, I think you might have the layouts mixed up, though. The level 1 layout has ten bricks while the level 2 layout has only 1. Could that be the problem?

    Also, a suggestion. You should set the collision mode on your menu sprites to bounding box so the mouse doesn't have to be right over the text to be clicked.

  • Yet another question from the amitious noob =P

    How does system => special conditions => OR work?

    I want to make it so that when the sprite is moving left or right, but the directionaly keys are not pressed he performs a sliding animation. How can I do this if I'm using the player[platform].vectorx condition to determine facing direction?

  • Do you want the character to be able to face the opposite direction he's in while sliding? If that's the case, you'll have to do things a little differently. Instead of checking the X speed, check which key is currently depressed. If the right arrow is down, set the angle to 0, if the left arrow is down, set the angle to 180.

    For the sliding, you'll need to check to make sure that neither right nor left is down. You can do that by negating the condition, which you do by right clicking a condition and clicking "Invert condition". As a subevent to that, check if the player is currently walking -- the platform behavior actually has a condition for this. If it is, set the player's animation to the sliding animation.

    I'm probably explaining this poorly, so here's a CAP file showing what I'm talking about: Sliding

    As for the "Or" condition, you can sandwich it between two conditions. If either of them equate to true, you're event will trigger.

  • Thank you for your help. I have been working hard on a game, and its nice to have someone give me help to maximise the game play.

    One last question on charactor movement, is there a way that I can have the speed of vector.x determine the speed of the animation (for running). I know there must be an equasion for this, but I'm not sure how to implement it.

    Thanks for all the support. I hope to be proficent soon.

  • The animation speed is a simple matter of finding the ratio between the current value of VectorX and the object's maximum floor speed. So, set the animation speed to something like this:

    abs(Sprite[Platform].VectorX) / Sprite[Platform].MaxFloorSpeed * AS
    NOTE: 'AS' is just a placeholder and should be replaced by the maximum speed at which you want the animation to play.[/code:2yjrbm54]
    abs() will return the value you specify as a positive value even if the original is negative.  This will ensure that the animation speed is never a negative value.
  • I'm sorry, does this go in the events, or in the tab that acctually says "animation speed"?

    I've tried both, but I'm not sure how to implement it as a condition and event, and when I try to put it in the animation box it just reverts to what ever the number it had there preveously.

    Do you have a cap? I'm more of a monkey see monkey do.

  • That would go in the event sheet editor. Equations don't work anywhere outside of conditions and actions. The proper place to implement it would be in your "Key is down" events. There you could set the proper animation as well as the speed with the equation I gave you.

    Anyways, I went ahead and whipped up a quick CAP illustrating all the things you've asked about so you could see how it can all go together. It shows the mirroring of the sprite, the sliding, and the animation speed.

    Platforming examples

    I hope all of this has helped you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you very much, I know I'm not realy the one to talk, but I might just try reiterating this thread into a sprite movement tutorial.

    I'm not going to post anything about the game I'm working on, but here is a demo of my movement system (thanks to linkman2004):

  • Glad I could help.

    Love the little guy, by the way.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)