jobel's Forum Posts

  • I don't think there is a way to change the backgrd color of the default loader.

    but I would suggest using the default "Progress Bar & Logo". Then just change the logo to your own logo:

    In the Projects Window, open the Files>Icons folder. Double click loading-logo.png (it will bring up the deafult C2 image editor and open your own image.) The default cyan blue progress bar will be resized to the width of your icon.

  • What I'm saying is only using a fixed value (0.1 is fixed) for the last parameter won't give anything but an easing out effect.t.

    okay, I'll give that a try.. thanks!

  • although for easein&out seems like you would need a 4th value that defines the curve maybe?

  • R0J0hound cosp seems to have an Ease In effect as well no?

    I've used lerps inside of a lerp..

    i.e. lerp(lerp(a,b,0.1),lerp(c,d,0.1),0.1)

    it depends on the application but maybe I can give lerp an Ease In effect by changing both values at different rates?? (now I'm starting to go over my own head)

  • hey Drew, it's looking great!

  • linkman2004 ahh very nice.. works like a charm!

    thanks, I needed this formula and I couldn't use the turret behavior for what I am doing... thanks again!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • R0J0hound trying to get predictive aim working, but it's not...what am I doing wrong?

    https://dl.dropboxusercontent.com/u/362 ... t_aim.capx

  • The main way to use easing like that is this:

    yes I've used lerp and cosp already just like this.. I was just hoping to use cosp with angles. I would definitely request an anglecosp() function.. how else is there to ease in/out simply.

    your old turret capx is a good work around though- thanks. I should be able to adapt it to my needs but it would be so much more simple to have 1 math function. I wonder if I could just do an Ease In and then fake the Ease Out. I could do the lerp backwards somehow..

  • thanks R0J0hound ! This is actually for a top-down space shooter.. I have a big heavy cruiser that catches up with the player (in a straight line making course corrections until the ship is in range). Once the Cruiser is in range, it slows down and uses it's 360 degree cannon to shoot at the player. Once the player is out of range the Cruiser needs to pursue. This is where the easing comes in.. If the Cruiser needs to rotate it looks horrible with lerp() because there is no easing into the rotation - it happens way too fast - and if I slow the rate down, the ship does WAY too big of a loop to catchup to the player. It looks fine easing out of the rotation.

    I'm just trying to make the movement seem semi-realistic due to the size of the ship - with so much mass you'd probably see slow and small rotations.

    so currently I'm doing:

    anglelerp(self.Angle,angle(self.X,self.Y,Player_ship.X,player_ship.Y),0.005)

    and instead I need:

    anglecosp(self.Angle,angle(self.X,self.Y,Player_ship.X,player_ship.Y),0.005)

    The one bug is if the course corrections(Cruiser ship rotation) are still happening when the target is in range. (because it's not supposed to rotate when the target is in range). The rotation suddenly stops - which kills the easing. But I've coded for that giving the ship some fake "aftertouch" which helps it looks like it'm slowing down to a natural speed. Even if it over shoots it doesn't matter since the ship has a gun with a 360 degree range - as long as it's headed in the direction of the player its fine.

    thanks for the capx.. that looks perfect! it should work!

  • I need an Ease-In-Out (Quad or Quart) dealing with rotation and angles.

    can anyone help?

    https://dl.dropboxusercontent.com/u/362 ... InOut.capx

  • The way I want to use it, is the Pointer is also moving.. so the rotation is basically making sure it's traveling toward the intended target.. but when the target is in range it shouldn't rotate at all.. infact it will slow down and stay in range until the target moves away and then it goes after it again..

  • Asmodean no no, the whole point is I want it tweened.. I can do normal rotate fine.. I want the rotate to ease in and out until it stops..

    I guess it doesn't know when it will stop so therefore probably can't tween..

    hmm.. maybe I need to recheck the distance when it gets to it's target? that way it can actually ease out...

  • Actually what I really need it to do is automatically always turn toward the target if it's outside it's range. Currently it snaps hard to the target once outside the rang.. I want to tween that movement. It's why I looked into using LiteTween since I couldn't figure out how to do angles with cosp or qarp etc.. and lerp doesn't work since it only eases at the end of the cycle (so it snaps to hard at the beginning of the rotate).

    here's an updated capx:

    https://dl.dropboxusercontent.com/u/362 ... eAuto.capx

  • thanks Asmodean but how do I get it to actually tween? there's no actual movement that I can see. I even set the timescale to 0.1 and it rotated just as fast to the object. I tried duration but that didn't work either..

  • okay thanks eli0s, makes sense, I doubted there was a way do it with official C2 behaviors.