RayKi's Forum Posts

  • Well, to make the arrows work a replaced the "on tap gesture" condition with the "is touching", and it work just fine.

    Now for the double tap scale rate, it's not working at first because every tick you set the scale of the object to the size set on the slide bar, so when the object is resized due the double tap it always go back to the slide bar size.

    However when I disabled the every tick code line it still didn't work because for some reason the double tap is not changing the value of your variable.

    Sorry for not being able to help any further

  • Create a variable with the amount of time you want it to last.

    Create a function that every tick will subtract a value from this variable.

    I suggest you to subtract to this variable the value of " 1*dt "

    dt means Delta Time and it will make the game subtract 1 every second independent of the player's computer frame rate.

    Now create a condition that when the variable value hits 0 will call the function "go to layout" if you want to change layouts, "set group active" if you want an specifically part of your code to be executed, or whatever other event that you want to happen as soon as the count down reaches 0.

    If you want the count down to appear on the screen use a text object and set to every tick to chance it text to the value f the variable.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1st create a variable with initial value of 0.

    As soon as the player collects the key set the value of this variable to 1.

    At the event that opens the door add a new condition to check the value of variable.

    For instance:

    Player on collision with door || Go to Layout

    Variable = 1 ||

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

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