LittleStain's Forum Posts

  • Without seeing your capx it would be guessing, but could the sprite be overlapping a solid?

    I created a test-capx and it works as expected when I make it, so there must be an issue in your capx..

  • You mean making the object bigger to show it's higher or are you using fake perspective or..?

  • You use timers, as in timer behaviour?

    You could ofcourse just use an on animation end trigger..

    What is probably happening right now is that you are not using else statements and as such all events trigger after eachother..

    When you want help with something like this adding your events would probably make answering your question a lot easier..

    BTW: Did any of my other answers to any of your questions actually help?

    So many of your topics seem to end in an answer by me or someone else, but no reaction anymore..

  • Wouldn't it be much easier to just use objectA or objectB inside your event instead of the family?

    You could ofcourse do:

    on family clicked

    subevent

    • mouse is over objectA

    or

    • mouse is over objectB

    > actions

    else

    actions

  • I guess I would go for sprite.bboxleft for the left side and sprite.bboxright for the right side..

    That would even work if the sprite has a different shape and is rotated..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Because the examples above don't work with solid behaviour..

    If you replace "player is overlapping wall" with "player is overlapping rock" in this example

    It should work as expected.

  • Well tile based games have tile based collisions...

    Sounds perfectly logical to me..

  • I'm sorry, but I'm not sure what the problem is..

  • Tried combining the container approach with this, and now the tail is offset and kinda moves slightly delayed? https://www.dropbox.com/s/o2yns4czyguw2 ... .capx?dl=0

    There isn't a container, only an object called container..

    Besides that I guess the issue is now that events are read top to bottom and the tail is set to the imagepoint before other events move your weasel..

    so it is actually always one tick behind in movement..

  • So far, my main character is just pinned to it's container, and that was how I was doing this.

    Problem is, you didn't reference/pick any object in your action/event so they weren't always pinned to the right one..

  • Like I said add container and it works...

    right click either the frog or the frogcontainer, go to the properties bar and underneath effect you find container..

    Add to container and select the other object..

    Ready!!

    You could have also found this in the manual

    (BTW: the reason I often link to the manual is because many people don't read it and it's actually quite usefull when you want to know how things work)

  • Also, what happens about, say, mirroring the animations when the collision changes direction? Does the engine know which enemy animation to mirror?

    Here's the problem I'm having: https://www.dropbox.com/s/wuz5t8ixdgq6dle/fraug2.capx?dl=0

    Add the frog and the frogcontainer to a container and it works..

    At the moment you aren't telling the program which frogcontainer belongs to which frog..

    Look at

    How events work

    and specifically the unreferenced objects part of that page..

    Using a container is one way to automatically pick the right object, other ways would be giving one of them a variable set to the uid of the other, or things like pick nearest as you tried before..

  • So it automatically selects a box if there are multiples? Is there a benefit to creating sprites via the event editor?

    A container creates all it's contents on created, it will first use what is on the layout..

    (Try removing two of the yellow sprites in the editor and run the program again, it will still look the same..)

    I guess it depends on what kind of game you sre making and what you are used to..

  • First you check if something exists, if it exists you get it and when you got it you do something with it..

    First you open your drawer to see if you got socks, if you have socks in your drawer you get them, when you have them you put them on your feet..

    Very funny structure..

    Also when does this get checked? On the start of layout? Every tick?

    Looking at the events posted..

    On start of layout > check if item exists..

    I think the action to check if the item exists is called on start of layout..

  • Something like this?

    Smooth grid movement