AnD4D's Recent Forum Activity

  • Hi guys!

    I want to include an expression which will allow me to adjust the width of a sprite based on the amount the L trigger is pulled on a gamepad. The width must be between 123 and 200.

    I currently have this formula:

    clamp(max(Gamepad.RawButton(0, 6)*(100+100),123),123,200)

    This works, but I noticed that I have to push the trigger down about half way before it starts responding, however, by the time the trigger is all the way down, the width is 200.

    If someone can have a quick look and tell me what I'm missing, I'd appreciate it!

    Trigger

  • If you just use force and have multiple objects of all different sizes, the small objects will move faster. The mass*gravity expression ensures they all move the same speed, which is what happens in reality.

  • Set world gravity to 0

    Set a global variable called "Gravity" and set it to 0.2.

    Give the object the physics behaviour.

    Event - Every Tick

    Action - Apply force at angle

    Angle = whatever you want, let's say 270 for fun.

    Force = physics.mass*Gravity(variable)

  • Constant force doesn't give realistic physics.

    World Grav = 0

    Gravity Var = 0.2

    Apply force to family = Object.Mass*Gravity Var

  • I'm not using 3rd party plugins, and I constantly got stuck. Waiting for Cocoon to be updated :(

  • That rarely happens. In fact, I can't think of a single time where things have changed beyond my understanding.

    You can stick to just the stable versions if you prefer...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'll help. I've been a tester on both games and software, and tend to have a natural ability at finding them :)

    I'm also familiar with C2, so may be able to lend suggestions as to why the errors are appearing.

    Question: Do you have control pad support? I'd like to give this a go on a TV.

  • Just signed up! Thanks!

  • I just wrote a nice explanation, but the damn thing timed out AGAIN!!!

    Basically, it was:

    Var1 = Current

    Var2 = Previous

    Every 0.001: Set Previous value to Current Value & Set Current value to tilt.

    You can then compare greater or less than.

    Hating this forum lately! Grrr!

  • emoaeden

    Wow, that helped me! Been interested in shadows for ages, but couldn't see a way to do it without 3rd party plugins. This would probably work on mobile devices!

  • Thanks

    It works, but why do I need to add an extra step (I know it's only one)? What's the reason for it jumping up to 100% opacity?

    Is there ever a time that you'll want it to go to 100% opacity first?

  • I'm using the fade behaviour to have an already transparent object fade in when created, and again fade out when it's to be destroyed. When I want it to fade in, it hits the transparency point and stays there... great! When It's deleted though, it shoots up to 100% transparency and then fades out.

    CAPX

    What am I doing wrong? Is this behaviour meant to work like this? I don't see how that's a useful feature.

    *Also, side note, is anyone else experiencing issues with the forum? Nearly every time I try to post now I find it's timed me out. I'm not that slow a typist!

AnD4D's avatar

AnD4D

Member since 4 Nov, 2011

Twitter
AnD4D has 3 followers

Connect with AnD4D

Trophy Case

  • 13-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
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

21/44
How to earn trophies