CloveltOc's Forum Posts

  • Been bugging me for some time, i´ll go straight to the issue:

    Topdown AI is done and each step works well individually. In the other hand, when a state is triggered, it swaps the behaviour of all instances in the family at the same time. I want to make each instance of the AI family work individually. I tried a system that matches an ID between the aiBoundingBox (not in the family) with the AI family, but seems useless.

    -Enemy (two sprites)

    ·Sprite ·aiCollisionBox

    AI (family)

    If aiCollisionBox is overlapping aiObstacles (family of sprites)

    -Dodge in the right direction with the right speed

    Else

    -Turn towards the player

    Edit: don´t mind that disabled event, I was just testing before making the screenshot.

    I know it´s dead simple, but I´ve found no answers by reading any family related articles/guides/manual posts, that´s why I´m posting this topic.

    If anyone comes with a way of simplifying the code a little bit too, it would be great!

  • You could try to put another condition:

    When player collides with enemy +Every 0.1 seconds: Substract 10 from HP

    (by the way, your link was removed)

  • I hope my explanation is comprehensible:

    I have an object with different frames, three instances of the same are created on top of each other (like in the picture). Everything should rotate with the camera (set layer angle works for me), but I would like to allign these vertically, so they would look like they are one instance, rotating like any other individual sprite would.

    Pin behaviour would be the super easy solution, but pinning an object to other of the same kind does not work for me, I read an old post about it but found no solution. I cannot rely on the X and Y coordinates either because i´m looking for a fixed Y point that would change when rotating the camera!

    Any help?

  • EDIT: Absolute facepalm, the initial frame was set to 0, I was setting the initial frame of a sprite with same appearance, I deeply apologise

    Thanks for everything, man, it now works sorry for being dumb

  • Nope, now it doesn´t work at all :I

  • I´ve got one sprite; its size, speed and hp is measured through its animation frame directly, so don´t worry about any of that. I want to make it so when this sprite overlaps other of its kind, both get compared to each other and the one with the biggest or equal animation sprite gets added the number of the other´s animation frame (if the biggest´s animation frame is smaller than 8, if its animation frame is 8 nothing will happen). In the end the smallest of the two will be deleted.

    Examples:

    ·Sprite (frame=0) + Sprite (frame=0) = Sprite (frame=1)

    ·Sprite (frame=1) + Sprite (frame=2) = Sprite (frame=3) etc...

    I know it sounds simple, and I think it is, but I´ve been thinking for a while, and even though code I made kind of works I know it´s not the correct way of approaching it...

    Any help would be greatly appreciated.

  • My bad, I created a different "dialog" instance variable for each member individually instead of creating a family instance variable and setting different text for each object.

    Thanks inmensely, LittleStain and I´m really sorry, terribly bad with explanations sometimes...

  • No, dialog is an instance variable that every "talk" member has, with different text. Is there any way to get that instance variable from the picked object?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Works like a charm! Thanks a lot for the quick response, LittleStain ! But do you have any idea on how to get the dialog variable from a "talk" object? It´s on the second image of my first post, i´ve been wondering for a while but I have absolute no idea on how to approach it!

  • Just two quick issues:

    1. - When pressing a key, a boolean toggles the bubble text system. The problem is that if you move closer to other interactive object (they are stored in a family) the bubble will change it´s position too, I would like to pick the closest only once. I´ve been trying it for a while but found no result.

    2. - All interactive objects are stored in a family, and each one has a "dialog" instance variable with a line of text (no conversation is intended). No problem when picking closest member to the player, but I´ve searched around and found no way to get the instance variable of the already picked object of the family.

    The code´s a mess, though, i´ll try to simplify it meanwhile.

    Any help would be greatly appreciated.

  • Just curious... Is moveto better than lerp, korbaach ? I´ve always loved the simplicity of anglelerp/unlerp/lerp

  • There are some really good effects there, including "seamless", which is what you need

  • Here it is, hope it helps <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> (I made it super simple though)

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

  • No problem,

  • Actually, bullet behavior stops bullets when their speed is 0, so here it is with physics, hope it is close to what you want:

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