sirkame's Recent Forum Activity

  • 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:

  • 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 :(

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

  • Hi! Until now I've been dividing long phrases manually by using variables (dialoguepart1, 2, 3, etc.) but now I'm trying to include skyrim-like books that you can read in the game, and it's a pain in the ass to divide the texts by trial and error. I'm using a very, very low resolution for the game, so I need to make a good number of divisions for each book. I want to make pages to flip with left and right, with the amount of pages stablished automatically.

    Is there some expression to get the text that doesn't fit in the textbox and put it in another page or something?

    Sorry if I explained myself poorly. My english is kinda limited =)

    Thanks and best regards.

    Tagged:

  • Helloooo everybody.

    Ok, weird issue. I have an object, a box, with physics behaviour, and then a solid ground. I want to play a sound when the box hits the ground. I used "on colission" and it works. So far, so good.

    But I have this code that says that one my character gets close to the box, it changes color by changing the animation frame to another one. Well, one this change happens, the sound kicks in for some reason. Both frames are exactly the same size, with bounding box as colission mask and the same Origin image point.

    I could understand that it recognizes a new colission when the colission mask is different from the previous frame, but it's not the case, and it's driving me crazy XD

    Thanks in advance for any help.

    Tagged:

  • Thanks. The moment I posted, the idea of adding the platform behaviour came to me. It works nicely now. Changing the gravity angle also creates a wall trap, so I'm happy with this solution :)

    Thanks!

    EDIT: Another problem raised up. When using the platform behaviour on several instances of an object, there's a problem I can't solve:

    "Platform on landed - then the code", BUT, it's not a per-instance condition. It only considers the landing ok when every instance of the object is touching the ground. If I use the "For Each" loop, it tells me that a trigger can't be a subevent in a loop and it kinda crashes.

    It seems like "platform on landed" doesn't work the same way as "on collision". Problem is, as I said originally, collisions are not working well in this particular case.

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