Khodex's Recent Forum Activity

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

  • Try Construct 3

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

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

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

  • In the current version (that you can download in the first message of this topic), characters can open doors which are of the same color of the activated button. It works with the blue buttons or the cyan ones.

    But the problem is that there are some... conflicts I think... when the two characters are at the same time on buttons of different colors. And I really don't know how to fix that. And I think when it will be fixed, my problem will be solved.

    Thank you if you have any idea to propose ! :)

  • Doors have a family instance variable (text) which is the color. A blue door has this variable setted on blue, a cyan door has the variable setted on cyan and so on...

    Buttons also have a family instance variable (text) which is empty until a characters activates it.

    When a character is on a blue button, the variable of the button becomes blue. If the button is of another color, the variable becomes of this color.

    So, I tried to open the doors with this condition :

    But as you can see in the .c3p file, it only opens some of the doors of the same color, not all of them as I would like.

  • Hello everyone ! First, I'm french so I'm sorry if I do language mistakes. ^^

    I hope you'll be able to help me.

    My game : DOWNLOAD file.c3p

    There are two characters, They can run, jump and you can swap control by pressing "down". They can stand on buttons in order to activate doors which have the same color than the activated button(s). If no button of a color is activated, all the doors of the same color are deactivated too and they go back to their initial position. Simple, right ?

    Here is my problem :

    I would like to use the same script bricks for the buttons behavior and for the doors movements. It's OK for the buttons but for the doors I tried multiple things and it doesn't work, I think that I missed something to make it work properly.

    I would like to create situations in which the two characters are at the same time on different buttons to activate different colored doors.

    Thanks a lot for reading and I can't wait to read your comments on this issue.

Khodex's avatar

Khodex

Member since 6 Sep, 2019

Twitter
Khodex has 3 followers

Trophy Case

  • 5-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

9/44
How to earn trophies