RayKi's Recent Forum Activity

  • Hi

    Your idea is quite interesting, although I don't know if it is possible. I don't know if devices now a day can sense the sensitivity of the touch.

    But I think that it's an awesome idea to give a try using the speed of the touch. So here we go.

    You can use a variable with initial value of 0, and every tick that the player is touching the screen you add some value to this var and then as soon as the player releases the screen you stop adding values.

    Try this, set some text objects for you to be able to check the speed of every touch, give it some tries, make some tests and you will find out the speed of the touch sooner or later.

    If the speed can be negative? Yes it can, when speed is negative it means the object is decelerating. But since you are measuring the amount of time that the user spends with his finger on the screen I don't think deceleration rules apply here.

    And yes you can compare more than two speeds, but you will need a different variable for each stored speed you want to compare.

  • Well for each object you have the functions "Is on layer" and "Pick top/bottom".

    If you know that layer A is higher than layer B you can compare the position based on that. But I don't know if this will help on what you want to do.

  • Ok, I'll call "A" the 1st image and "B" the 2nd one.

    If the images will be always on the same place you can just create the object at the X and Y that is between those images.

    If the images change places try this;

    Create object at

    x = A.x < B.x ? A.x + (B.x - A.x)/2 : B.x + (A.x - B.x)/2

    y = A.y < B.y ? A.y + (B.y - A.y)/2 : B.y + (A.y - B.y)/2

    What this is doing is:

    (A.x < B.x ?) > Is A.x smaller than B.x? In other words is image A on the left side of image B?

    If it is then X will be the part of the code between the "?" and the ":"

    So "x = (A.x + (B.x - A.x)/2)" Which is the same distance from the origin as the image A plus half the distance between A and B.

    If it is not then X will be the part of the code after the ":"

    So "X= B.x + (A.x - B.x)/2" Which is the same thing as before but considering B is on the left side of A

    The code for Y is exactly the same.

    Of course this codes will create the image always in the exact center between images A or B. To create objects anywhere between the A and B the code should be different.

    I'm not sure if this is the best way to do it, but it's how I would do it. Hope it helps

  • Well, I don't know how to solve this problem exactly yet. But I manage to change a few things and made the green line disappear and now the game is ok.

    Thank you guys anyway ^^

  • If the animation is smooth the button will work as such

  • No, I have a tile map. Only this two tiles on the picture are independent tile map objects

  • Do you want the speed to increase more and more as the player keeps tapping?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey guys, I created a few tiles as different objects to be able to create a few hidden places in my map. But the thing is, even though the tile size is 64x64 px and the image on it is also 64x64, construct2 sets a copy of the tile underneath it.

    So when I try to test the game I get this weird green line appearing in the middle of the ground shown up exactly what I'm trying to hide.

    I don't know what to do here, but this is really making my game extremely ugly.

    What do you think?

  • If you understand CSS you can try and work with that. But if you are just like me and doesn't know how to properly use CSS you can try using sprites with animations as buttons. I do it and it works just fine.

    Create a sprite with the frames of the animations of your button, and then create events to call this animations. O mouse over, on mouse click, on mouse release. Simple like that

  • There is a function on construct 2 that reads double taps or double clicks and also there's functions that capture the moment the player releases the button. Just set the speed of the character according to this events.

  • Just save the values on a global variable and apply them on the start of every layout

  • Well in that case is quite simple. Working with effects works the same way as working with behaviors, you just use the properties menu on the left of the screen to add the effects that you want on your sprite, in your game it would be the "Adjust HSL". And then in the event sheet you create the conditions and events that will change the effect.

    add action > select the object you have applied the effect > Under appearance select "Set effect parameter"

    The "Index" is 0 for Hue, 1 for saturation, and 2 for luminosity.

RayKi's avatar

RayKi

Member since 25 Feb, 2014

Twitter
RayKi has 98 followers

Connect with RayKi

Trophy Case

  • 10-Year Club
  • x5
    Popular Game One of your games has over 1,000 players
  • x3
    Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

15/44
How to earn trophies