Add Obstacle via UID?

0 favourites
  • 7 posts
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • Hi,

    could someone help me how to add an Obstacle like Object(UID) instead of all instances?

    Many thanks :)

  • Add obstacle into the pathfinding behaviour?

    On condition, pick the instances you want to add. Then for each instance, add as obstacle.

    Example:

    Condition

    Pick all ObstacleSprite.

    ObstacleSprite.X > 100.

        Sub-Event               Action

          For each Sprite.      PathfindingSprite:Add obstacle ObstacleSprite.

  • Thanks.

    But I need it exactly the other way; I want to add one instance of an object to the one picked in the condition, such as

    object(9) -> "add Obstacle" object(21).

    In the action "Add Obstacle" I do not know how choose specific instances.

    Is there any way to do this?

  • Your object(9) have to store the uid of object(21) in the variable.

    So you can pick object(21) by uid using the variable. Then add to obstacle

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Could you show me an event sheet how you would set this up?

    It does not matter if I pick object(9) or object(21), the problem is I can only add ALL instances as obstacles IN THE ACTION, rather than a specific one.

  • Oops. My bad. It will add all the same instances of the object as obstacle even if you push in 1 only. <img src="smileys/smiley9.gif" border="0" align="middle" />

  • Yes, currently the only way I see is to create a temporary Obstacle wherever needed, so only this one is accessed (and added) in the single action.

    Any other ideas still welcome!

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