Limit angle height?

This forum is currently in read-only mode.
  • Hi, I'm wanting my players arm to only go a certatin height before stopping.

    http://detabeta.com/HL2DBeta.zip

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • At the risk of getting another "what does that mean?" response, I'm going to answer this...

    You need to add a condition to your event that compares the current angle with the maximum angle. Like so:

    +spriteArm.Angle Greater than -45 degrees
    -Set spriteArm.Angle to (spriteArm.Angle-5)
    [/code:t8d29nh8]
    
    This is just an example, mind you.  There are several ways you can do this.
    
    Judging from your recent questions on the forum, you seem to be having trouble with basic things like comparing values and using multiple conditions in your events.  Have you read the tutorial?  It covers a lot of the basics as far as setting up events and performing actions.  I suggest you start there.  And don't just read it... do what it says.  Make the tutorial game while you follow along.  It's good experience.
    
    [url=http://scirra.com/files/ghostshootertut.zip]http://scirra.com/files/ghostshootertut.zip[/url]
  • Okay, I just ran through the tutorial again and oddly enough, there aren't any events with multiple conditions in them. Suffice it to say, you can have more than one condition to trigger an action, like so:

    +enemySprite is visible
    +enemySprite overlaps bulletSprite
    +enemySprite.Value('shield') = 0
    -Destroy enemySprite
    [/code:6xq5101z]
    
    All you have to do is right-click an event condition and select "Insert New Condition," or click an existing condition and click the "+ New Condition" link that pops up.
    
    Argh, sorry for the double-post.
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)