MessMess's Forum Posts

  • Played your game and it was really fun. Loved the bee animations!

  • The reason you are having the problem is because it creates the object on a click, then immediately runs the next event which is to rotate on click. A better fix would be to lock out the rotate event on towers that were recently created, perhaps with a 'state' variable. When you release mouse click you can set the variable to allow the tower to be rotated.

    lionzThis seems like great advice.

    Is a "state" variable the same a global variable?

    Also, where in the order would the release mouse click code go?

  • Like this:

    That did it!

    You made my day. Thank you so much.

    Edited: Just wanted to add, thank you for teaching me about families and sub-events. I think I understand both concepts now and I was able to use that new knowledge to enhance and streamline my code. Very cool!

  • Really appreciate your patience (I'm used to more traditional programming and I guess I haven't fully grasped events yet).

    Anyway, I think I added the check for the ObjectTypeName correctly (see image):

    But, where the heck does the Else go? I can't even find an else statement in the events sheet.

  • I feel very dumb and I'm not sure what I'm doing wrong now.

    I made the change you suggested and now it is only rotating that one tower called "Turn", but it's back to also calling the code on the left click below it.

    Here is the relevant code bock:

    Here is an image from the game:

    So, what should happen is:

    - If you left click on an "Obstacle" object (which is not in the Families, "Towers") it will add a new "Turn" object. This currently works.

    - If you left click on a "Turn" object (which is in the Families, "Towers") it will rotate the turn. This works now too. But, it's also creating another instance of the "Turn" object.

    I need clicking on the "Turn" Object to only kick off that code, even though the "Obstacle" object is right underneath it.

    Thanks for any guidance.

  • Families seems like the best solution, but I must be doing something wrong.

    I created a family called towers and put all my tower objects into it.

    This is my event:

    But now, when I click on it, every instance of "Turn" is rotating, not just the one I clicked on.

    Any idea, what I am doing wrong?

  • I have an object on Layer 0 (called "obstacle") that responds to a left mouse click.

    I have another object on Layer 1 (called "turn") that also responds to a left mouse click.

    The problem is, if "turn" is on top of "obstacle", when I click on "turn", "obstacle" triggers as well (even though it is hidden underneath).

    How do I stop both objects from triggering at the same time and just use the object that is visible and my mouse is touching?

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello everybody.

    I made a game a few years ago (with Unity). It's up on Steam and had some success, but I hated working in Unity.

    I got an idea I'm excited about for a new game and I've been lurking here for almost a year, trying to decide if Construct 3 was the best fit for me. The more I played with it - the more I liked it.

    So, this past week, I jumped in with both feet and got to work on the game. It's going great so far and I'm loving Construct 3 (even bought an annual subscription).

    Everyone here has been so helpful and I'm looking forward to the day when I can share my game with all of you.

  • You do not have permission to view this post

  • These are great suggestions!

    I will try these out and see what works best.

    Thank you so much.

  • I am making a tower defense game (and having a lot of fun doing it).

    My layout (level) consists of open squares (the enemy can move through) and solid squares (they cannot move through).

    I would like to be able to right click on a solid square object and have a pop-up menu open, where I can select a tower type and then have it appear on that square.

    I have searched, but have not found a game or tutorial, that seems to have a simple pop-up menu like this.

    Can someone point me in the direction of a game or tutorial, I could look at and learn from?

    Tagged:

  • Thanks so much - that did the trick!

  • I want to be able to hold down the left mouse button to fire (not click), but I only want it to fire once per second.

    I am currently using "Left button is down" to trigger the fire, but that is happening 60 times a second.

    How do I make it fire only once per second?

  • Well, it's very cool. I would love to learn how you did it. Is the code available for it anywhere?

  • Just curious, the "Game of Life" that you made, was that done in Construct 3?