Khodex's Forum Posts

  • I finally found a solution thanks to this old topic from R0J0hound : construct.net/en/forum/construct-2/how-do-i-18/parabolatracjectory-tracing-55313

    Here is an example that predicts the path of a projectile. It also calculates a speed/angle to shoot so that the projectile path passes over the mouse position. You could alternately just set the speed and angle.

    https://www.dropbox.com/s/9tftyryvn0pab ... .capx?dl=0

    This one has the math to take into account linear damping:

    https://www.dropbox.com/s/f5jsfbl3d1szj ... .capx?dl=0

  • Sorry, it's very hard for me to understand your answer just by reading the file because I'm so bad at Maths.

    The fact is : in my .c3p file I have a curve which is made in a specific way and I would like to know if it is possible to shoot something by using this curve. As you may see, I want to be able to scale the curve thanks to the mouse wheel and then, the bullets will follow this new curve.

  • Hello everyone !

    I created a parabola like this : .c3p FILE

    I can shoot bullets but I would like that the bullets follow the exact parabola curve. When a bullet is shot, it has to exactlty follow the curve like the curve was when the bullet was shoot. So if the curve move, the bullet previously shot does not have to follow the new curve, I hope I'm clear.

    Thanks a lot if you have any idea of doing this ! :)

  • It works pretty well !

    Thanks a lot Asmodean

  • Hello everyone !

    I would like to have multiple instances of the same object in the scene and each one should be rotated towards the next instance of this object.

    This object has an instance variable called "ID" and each instance have a different ID. So, I would like the instance with the ID 0 rotated towards the one with the ID 1. The 1 towards the 2 and so on.

    But my logic seems to be wrong in the event sheet. Could someone help me ? Thanks a lot !

    The project file

  • Thank you Kyatric I understand your answer, sorry I didn't explain my question very well.

    In fact, because I will have a lot of buttons with the same behavior but of different colors, I would like to avoid to repeat the event for each color. So yes, it works if I use :

    Family Buttons - Color = "blue"

    +

    Family Buttons - Color = "red"

    +

    Family Buttons - Color = "green"

    and so on...

    But what I would like to to is to create an event in which it is written :

    "Pick all buttons where instance variable color is equal to the color of the current instance"

    In other words, I would like to have this event :

    "- For each button

    - Pick all other buttons of the same color

    - If none of them is pressed

    Action = deactivate all the doors of this color".

  • Is there a way to pick my buttons like this ?

    "Pick all buttons where instance variable color is the same"

    In order to create this event :

    "If all buttons of the same color are not overlapping at offset a character = close the doors of this color".

  • I updated the file, now the buttons are all pressed at the same time if one of the two characters is standing on one of them. I think it is more logical and understandable for the player.

    Now, my only concern is about this trembling movement when one of the two characters is leaving a button which is already pressed. It's just a matter of polish.

  • OK, I tried and there is a little trembling movement but I think i can fix it. Thank you for helping. It was pretty useful !

  • I think that I am on the right track with what proposed but there is still a problem with the functions :

    If I put one of the characters on a blue button, it's OK the blue doors are moving. Then, If I put the second character on another blue button, nothing else happens and this is the expected behavior, so it's OK ! BUT, if I removed only one of the two characters from a blue button, the doors go back to their positions even if the other character is still on a blue button.

    If someone has any idea to fix that, it could be very cool because I'm lost ! Thank you !

  • I cannot open your link.

    What I try to achieve is :

    As long as at least one button of a color is pressed, all the doors of the same color are activated. The doors stay activated until no more of these buttons are pressed.

    Because there are two characters, two different colors can be activated at the same time.

    And I would like to use only families events to avoid to copy/paste the behaviors for all of the differents colors I'll have in my game.

  • I mean, if I put the two characters on buttons of the same color, it behave weirdly.

    I hope this time, the image will be displayed :

    But 'ill check if I can adapt it ! thanks !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thnak you for your time on it but there is something which doesn't work in what you did : I cannot press two different buttons at the same time. But I see how you used "For each", thank you.

    My problem is still here. ^^"

  • To be honest, I really don't know how to use the "For each" event. :/

  • Thank you for your answer.

    I don't know if you checked the last version of the .c3p file but I think this is what I've done in my "GPE " event sheet.

    The event is :

    - If a button is playing "ON" animation (if it is pressed)

    - - Pick doors(family) where instance variable color is equal to buttons instance variable color

    And it works but only if no other buttons of another color is pressed. This is the problem.