sirkame's Recent Forum Activity

  • I probably misunderstood your answer. What's wrong?

  • Hi! I'm sure this is a pretty easy one, but I can't seem to get it.

    When a function is called, there's a loop that creates as many sprites as a variable value says (fist one is created right on player's X position, Y-16), adding 16 pixels on X to every new sprite, so there's some space between them. Now what I want is for all those sprites to be set centered on top of the players head. So if I make 5 sprites, I want number 3 to be right on top and the others on the sides.

    I tried to set self.x-16*sprite.count but it doesn't work.

    Thanks for the help.

  • howtoconstructdemos.com/z-sorting-in-an-isometric-view-game

    OMG what a nice solution. thanks!

  • Thanks! You gave me some really good ideas. I'll try a few and see what fits better.

  • Hi!

    Quick explanation. An UFO comes carrying the player, so I use lerp to get the UFO into position, drop the player in the ground, then I want it to leave flying up in the air, but lerp only gives the effect of "decceleration", not acceleration.

    I've read about unlerp but have no idea if it may be useful for this or it's a math calculation for other stuff.

    Any help is very welcome :)

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Solved it!

    (round(distance(PowerPuncher.X,PowerPuncher.Y,BallBox.X,BallBox.Y))/40)*10

    40 is the max px the puncher can travel from the ball, limiting the power it's gonna use to punch the ball off. Now It's represented as a 10 in a text box :)

    Thanks for the help!

  • Hey there, are you familiar with the lerp() and unlerp() expressions? They could help to solve your problem

    Yeah, kind of, though I use that mainly for camera movement or enemy behavior.

    Mechanically what I'm doing works flawlessly. It's just that I want to transform an "ugly" value into a rounder, more pleasant one. It's easier to understand power from 1 to 10 than 1 to 234.5

  • Hi!

    I hope I explain myself well enough.

    I'm making a side-scrolling minigolf game. I used the catapult code as an example to make a little "puncher" that can only separate from the ball a certain distance, like the pig from the example does with the top of the catapult. Now I can easily make an impulse based on that distance, so I can control the limit by dividing it or whatever.

    But I'd like this maximum distance that goes from 0 to, let's say, 25,3 (in pixels) to show as 10 in a textbox. So no matter the real value it's working behind the scenes, I want the max distance to be represented as 10 (you now, something rounder, 0 to 10 in power). Or 100, or whatever the number I like.

    Some help with the formula? I'm terrible at math :(

  • I'm been searching for this and can't get any answer. Is it possible to effectively limit the game fps to 60?

  • Wow, very interesting solution using a timer. I'll get it a shot, thanks so much!

    Edit: It works great! Totally forgot about that behaviour :) Thanks again.

  • Hi everyone!

    Ok I have a problem with my shooting mechanic. I don't use "every x seconds" for shooting because it's really innacurate because of the way the time lapses, so I usually make my machine guns with:

    Which works perfectly well, but with this code, if I stop pressing my button (ShootSmall goes from 1 to 0) and press it again, no bullet will come out until the waiting time passes and CanShoot variable allows that.

    So I want to make that when I stop pressing the button, all the waiting thing resets and it inmediatly shoots so the player can spam the shoot button if he thinks he is faster than the auto-shooting.

    I hope I explained my self well enough.

    Thanks!

  • You do not have permission to view this post

sirkame's avatar

sirkame

Member since 23 Jun, 2014

Twitter
sirkame has 2 followers

Trophy Case

  • 10-Year Club
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

14/44
How to earn trophies