Still problems with addressing the right object.

This forum is currently in read-only mode.
From the Asset Store
Awesome drifts on auto generate way,tap to steer right.
  • Well the last thread got "solved" but I didn't get any wiser.

    My previous post:

    I have a similar question:

    I tried to make a function where you can push boxes around in grid movement. I didn't get very far before I noticed that the events addresses ALL of the boxes instead of the one I'm actually colliding with. Which means that when I'm pushing a box one direction, it's actually pushing all of the boxes in the same way.

    In MMF2(which I have some experience with) it automatically targets the right one and the others are left alone.

    What can be done to fix this? Or, what would be a more affective way to achieve the push-function?

    Link to .Cap-file:

    http://falconshield.com/spel/dungeon%20construct.cap

    I tried to switch between objects in the event-sheet but that didn't help. Also Construct just crashed when I tried PixelRebirth's example.

    What's wrong with this?

  • Well the last thread got "solved" but I didn't get any wiser.

    My previous post:

    > I have a similar question:

    >

    > I tried to make a function where you can push boxes around in grid movement. I didn't get very far before I noticed that the events addresses ALL of the boxes instead of the one I'm actually colliding with. Which means that when I'm pushing a box one direction, it's actually pushing all of the boxes in the same way.

    > In MMF2(which I have some experience with) it automatically targets the right one and the others are left alone.

    >

    > What can be done to fix this? Or, what would be a more affective way to achieve the push-function?

    >

    > Link to .Cap-file:

    >

    > http://falconshield.com/spel/dungeon%20construct.cap

    >

    I tried to switch between objects in the event-sheet but that didn't help. Also Construct just crashed when I tried PixelRebirth's example.

    What's wrong with this?

    You probably need to use the latest unstable version (in announcements), not the stable one on the website.

  • Read the wiki article on conditions to fully understand how to address the objects you want.

    The basic way events work is to pick an object you want to affect (or as you put it, address) by using conditions. For example, any SpriteA actions in a 'mouse is over SpriteA' event will only affect the SpriteAs under the mouse. If you want to affect just one object, you need to think of the condition or conditions that will pick just that instance. It's a different way of thinking compared to scripting or programming languages - first isolate the instances with conditions, then do something to them - but it becomes natural with some practice.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah I managed to solve it eventually. However a bunch of other issues came up so I'm trying different solutions atm. Thanks for the answers!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)