sunfffd's Recent Forum Activity

  • I saw there is a Timeline Pause action which you need to specify a tag

    But I dont seem to find where can I tag the whole Timeline?

  • The reason this isn't working is because the conditions that pick the Family object don't also pick the specific Factory object, so your "Factory isDestroyed" condition picks all of the Factory objects.

    There are a few ways to get around this; the simplest is to shift your "isDestroyed" variable to the Family and then change all the conditions and actions referencing the Factory object to the Objects family.

    Another way would be to move all the Factory conditions and actions to a function; then, in the ObjectType = "Factory" subevent, pass the picked Object's UID to the function in a parameter and use that passed UID in the function to pick the Factory.

    Thanks, the UID method sounds good!

  • that would be a pretty complicated collision mask... but it should work.

    an alternative would be to make simpler cloud shapes, and then combine several to make up a cloud that looks like that - an if you randomise it, you could get different clouds each time.

    If I have multiple instance of the factory objects in my screen, how can I reference only the one that I touch in my actions?

  • I have a number of Factory object instances on my screen, when they are touched, animation will play on the touched instance.

    But now when they are touched, all of the instances will play the animation.

    How can I reference only the object that I touched?

  • The simplest method would be to use the is overlapping condition.

    On touched factory

    ->cound is overlapping factory(inverted), do foo

    Thanks, is the overlapping check determined by the bounding box of the sprite or the collision mask?

  • that would be a pretty complicated collision mask... but it should work.

    an alternative would be to make simpler cloud shapes, and then combine several to make up a cloud that looks like that - an if you randomise it, you could get different clouds each time.

    I found the problem, somehow the collision mask are not correctly set. So the clouds are getting a full rectangular collision box...

    Combining with your solution it works perfectly now.

    Thanks again for everyones help.

  • here is a quick sample:

    I gave the family an instance variable to tell the objects apart, but there are other ways too...

    https://rieperts.com/games/forum/PickTop.c3p

    Thanks for the example that's very clear.

    I have some irregular sprites like the cloud covering the factory below

    Do you have any idea on how to detect the touch "through" the empty parts of the clouds?

    I checked the collisions mask but it seems it wont be used for touch detection.

  • I have sprite obstacles in different shapes and sizes covering some other sprite objects in screen

    For example clouds covering a factory, how can I implement some kind of click/ touch mask so that the touch to the factory is ignored when the white part of the cloud is touched?

  • what I do in similar situations is put all the objects in a family, and then when checking for touch, use the family and pick the top instance. Then if it is an obstacle, just ignore it.

    Thanks. Can you show me an event sheet example of how to implement this?

  • If sprite1 not overlapping sprite2.

    Or add a boolean variable to sprite1 and turn to false if is overlap the sprite2, then compare variable.

    Thanks. If I have sprites that has irregular shapes? Can I detect the touch based on the collider?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a game object for user to touch and destroyed.

    When it is cover by another obstacle, I want the obstacle to block the touch event, how can I implement this?

  • Thanks it works

sunfffd's avatar

sunfffd

Member since 12 Mar, 2020

None one is following sunfffd yet!

Trophy Case

  • 4-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

6/44
How to earn trophies