dop2000's Recent Forum Activity

  • character cannot be controlled in air, if on ground and pressed up and forward - it jumps forward, if only pressed up - it jumps up.

    So after character jumped, it can't be controlled until landing - is this what you need?

    Here is a demo (see the last 3 events):

    https://www.dropbox.com/s/8tak0k183wbdk ... .capx?dl=0

  • No, it does what it supposed to do - if sprite is overlapping a solid, "Opposite" method moves the sprite in the direction opposite to the movement direction, until the sprite no longer overlaps the solid. It's your job not to create such situation when the sprite will be pushed deeper into the wall.

    Custom Movement behavior provides very basic "building blocks" for creating your own movement engine. If you want more advanced events, which will automatically prevent collisions, maintain constant speed etc., then you need to use Platform/8-Direction/Car etc.

  • Yes, UID is more suitable to situations where instances are dynamically created/destroyed during the runtime.

    If you are manually placing sprites on the layout, use ShapeID from my previous comment.

    Manually set ShapeID to "1" for all sprites of the first shape, "2" for all sprites of the second shape etc.

    Then use this ShapeID variable in your code to identify which sprite belongs to which shape.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Then go for it!

    Starting a difficult project is the best way to learn a new programming language. If you have any questions, post them in "How do I.." forum, there are always people who can help.

  • Sure, you can use layers, but this is not a good or effective way to group instances.

    I still don't understand you game. If those complex shapes are made from several different objects (Circle and Line sprites), then you can do this:

    Add Circle and Line to a family "ShapeElements". Define an instance variable "ShapeID" on the family.

    For all the circles and lines of the first shape, set ShapeID=1

    For all the circles and lines of the second shape, set ShapeID=2

    Now all 14 elements of your shape 1 are logically linked together, you can do "Circle compare variable ShapeID=1" and this will pick 7 circles.

    Or you can "ShapeElements compare variable ShapeID=1", this will pick all 14 circles and lines.

    (Family in this example is optional, but I assume that circles and lines share some features and properties, so adding them to a family seems like a good idea)

    Linking by "parent.UID" is a bit different. You don't need to keep track of all UIDs, it's easier to give an example:

    https://www.dropbox.com/s/kr2gy6xwi3gxq ... .capx?dl=0

  • Hey NN81

    I don't think this is a bug.

    With "Opposite angle" the object is teleported when you rotate it very close to the wall and its angle of movement is pointing away from the wall. The behavior tries to push the sprite in the opposite direction (because that's how "Opposite angle" method works) and as a result it pushes it deeper and deeper into the wall. And finally it pushes it out at the other side of the wall.

    "Nearest" mode works much better if you define correct collision polygon on the sprite. But it can still slow down the sprite, because its purpose is only to prevent overlapping. If you need to maintain constant speed, you will have to do this with events. Or simply use 8-direction

  • You do not have permission to view this post

  • This is not an easy game to make for a beginner.

    I think maybe use a 9patch object to draw lines. When player touches one dot, you spawn 9patch and as the finger moves, increase 9patch width. When the finger changes direction, spawn a second 9patch at a different angle and so on.

    The tricky part will be to allow the player to leave the line unfinished, then return to it later. Or build two lines from both dots and then connect two ends together.

    Also, if levels are created randomly, you need to make sure that they are solvable.

    All this can be done, but the logic might be a bit complicated.

  • Either you misunderstand the purpose of containers or I misunderstood your question.

    Container itself is not an object, therefore there are no "container instances" and no container UIDs.

    Containter is a way to logically link together several instances of different objects.

    Only one instance of each object can be in a container.

    For example: 1 Enemy sprite, 1 EnemyHealthBar sprite, 1 EnemyName text, 1 EnemySkills dictionary etc.

    When you create an Enemy instance, all those other related objects will be created automatically.

    When you destroy the Enemy, all instances of other objects from the container will be destroyed as well.

    When one instance of any object is picked by an event, all other objects from the container are also picked automatically. So you can do things like this:

    Bullet on collision with Enemy -> EnemyHealthBar set visible

    or this:

    Mouse On clicked EnemyName -> Enemy start flashing for 1 second

    What objects are in your container? It's hard to tell from your screenshot.

    If you need to link multiple instances of one object to 1 instance of another objects, containers will not work.

    Say, if you want to group 1 HexCell, 7 Circles and 7 lines, you need to use instance variables.

    Usually, you select a "parent" object (HexCell) and add an instance variable "HexCellUID" for all dependent objects (Circles and Lines). Then you can pick them:

    Mouse On clicked HexCell

    ....Circle compare variable HexCellUID=HexCell.UID -> Circle set animation ...

    Or the other way around:

    Mouse On clicked Circle

    ....HexCell pick by unique ID = Circle.HexCellUID -> HexCell set animation frame to 1

    (If you are using Pin behavior, you can refer to pinned objects with built-in expression PinnedUID)

  • Oh, ok, here is the updated demo:

    https://www.dropbox.com/s/0ffgp2436nwxy ... .capx?dl=0

  • This event actually works and attack animation starts playing, but you have other events #18 and #19 on the PlayerEvent sheet that immediately change animation back to idle or some other one.

    You have a bit of a mess with different events setting different animations..

    I would suggest adding an instance variable "playerState" and set it to "run", "attack", "jump", "idle" etc. And then create a single event that changes animation when playerState changes.

  • You can add Drag&Drop behavior to the Boombox sprite in my example, move it around and see if the sound area follows it. (it does)

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 259 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies