LeKinkss's Forum Posts

  • hey !

    This is an issue that ive got.

    Currently, with only keyboard, the event is working ( Set boolean ). OR

    Only controller event.

    But with theses two events ( I can hold Space or Hold A with my controller and the event will work ).

    I want the player to not hold Space or A. I want him to release the button.

    Thanks !

  • Hey ! I got something really special.

    this animation (image) is only working if my player is from the ground.

    If i jump to the ring, i can grab it, or fall, the event will work but not the line with the " set animation "

    Tagged:

  • Hey everyone !

    I tried to read about Delta time.

    I know that behavior works fine for that.

    But i have an increment while pressing space.

    A Number variable called " jumpHigh' . When the player keep the Space key Down, the var is incremented.

    My screen is at 144fps, but when i run the game on 60 fps. It takes slower to increment the var.

    What can i do ?

    Thx

    Tagged:

  • Hey evryone !

    I have several issues with my game.

    First of all ? I use jump sustain to make my player's jump higher or lower depends of the button pressed. Is there a way to make this better ?

    But the big issue is my grab system with rings. When i jump one of it, it works, i can rejump. But if i jump on another one without touching the ground. The next time i press jump, my player will fall off. I dont know why.

    And how can i make my player not jump while pressing down then encounter ring then rejump still with jump button down ?

    Thx !

    we.tl/t-ABbvHO7Ufj

  • Well the opposite of the last action depends on how you have your actions set up, which I do not know.

    You could also keep track of the locations that an object has been to instead, and use those to move instead.

    Each object can have its own history. So when you use undo just do it for each object based on it's own history, and keep track even if it didn't move.

    I can put an example together later.

    Edit: dropbox.com/s/1vi6kp5p7lcn30n/undo_example.c3p

    It works ! but when you are at the initial position, players go to x.0 y.0. How can i avoid to do that ? if you spam Undo.

    Or the player and objects delete itself

  • Well the opposite of the last action depends on how you have your actions set up, which I do not know.

    You could also keep track of the locations that an object has been to instead, and use those to move instead.

    Each object can have its own history. So when you use undo just do it for each object based on it's own history, and keep track even if it didn't move.

    I can put an example together later.

    Edit: dropbox.com/s/1vi6kp5p7lcn30n/undo_example.c3p

    Thanks a lot !

  • Use an array to store a history of moves.

    Every time a move is made, push the action/result into the array. When undoing, do the opposite of the last action, and delete it from the array.

    I never used array.

    Can you make me an example please? Thanks!

    i want that my player undo, but even his actions. If he pushes a box, i want to undo too.

    cant understand " do the oposite of the last action " how to do that ?

  • I make a top down puzzle game.

    And i will like to make an undo system like BABA IS YOU.

    when pressing a key, back to last step / grid position.

    Thanks !

  • I'm having problem with detection.

    I want to make a block changed animation or even spawn another object when close to another one.

    But with my code, the green block becomes yellow (change animation) when close to the " fire " brown block. But i need to change the animation of my block when he is not close to the fire block.

    Please help !

    ibb.co/3cJ0DVM

    we.tl/t-ax9t0pPvEw

  • I know, thats a question many times asked. I even follow this guide : construct.net/en/tutorials/push-objects-tile-based-game-2592

    ibb.co/qr7chZg

    My player will push the block even if he is at the top left of it.

    X0

    0B

    it should only work if

    00

    XB

    X is the player

    B is the block

    EDIT : fixed it, but i had to reduce my player hitbox.

    But the thing, objects are overlapping when they are at top left and top bottom left

    X0

    0X

    Like this. Can someone explain this to me ?

  • Your "DistanceJoueurExplosion" is calculated every tick, once all the explosions happened, in event 26.

    Simply take the action that make that calculation and add it to event 22 before the "ProjectileImpulsion" destroy action and your code will work as intended.

    > Thanks !!!

    >

    > Last thing, now, my mouse cursos is getting stucked on edge of the screen. My computer screen when on full screen. What can i do to not stopped the mouse ?

    What do you exactly want to do ?

    "What can i do to not stopped the mouse ?" - I don't understand that at all, even in French, it doesn't make sense to me :P

    Do you want to hide the crosshair when it is "stuck" on an edge of the screen ?

    sorry, english is bad haha!

    when i am moving the mouse, its not fluid as before. And when my mouse reaches the edge of the screen, the mouse stop. You can test it.

  • Your "DistanceJoueurExplosion" is calculated every tick, once all the explosions happened, in event 26.

    Simply take the action that make that calculation and add it to event 22 before the "ProjectileImpulsion" destroy action and your code will work as intended.

    fixed :)

    but now, my mouse is stuck on edged of my screen haha

    and not that " fluid " when i a moving it slowly. Like steps and not following the mouse

  • Thanks !!!

    Last thing, now, my mouse cursos is getting stucked on edge of the screen. My computer screen when on full screen. What can i do to not stopped the mouse ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Turn off all of your other events for setting the angles of you lazer and projectileimpulsion.

    Add the events and variables in from my post.

    Replace the "turret" in event #3 in my events with "lazer" from yours. (event #13)

    Now edit the event Projectileimpulsion - set angle to AngleDiffViseurPerso and instead set angle to lazer.angle. (event #18)

    Now the angle of the turret and any spawned projectiles will be set towards the mouse position if the mouse is moving. If the mouse is not moving they will be set to the last angle.

    it didnt work... :'( i am so bad

    the lazer follows and stop. that is working. But the game didnt keep the last angle, and why i click, the lazer go to the position of the mouse and spawn the projectile.

    can you help me please ? : we.tl/t-DTYNfqiC26

    i want to work it so bad.. but with my code, it didnt work.

  • To determine if the mouse is moving you need to save the mouse's coordinates to variables every frame and then compare them to the current coordinates:

    Use these events:

    Turret is the aim of the mouse ? what's it in your code ?

    its not working with my aim cursor which follows the mouse

    Do you donwload my project ? there is events for the mouse before, maybe its not working because of this

    What is your turret in your code ? the gun of my character ? he doesnt have one