work3's Recent Forum Activity

  • R0J0hound Thanks so much for your time and help.

  • Positioning with events can be as easy as setting an object position to another objects position or one of it's imagepoints.

    You can also save the offset and just set the position from that. Like this more or less. There are more deluxe ideas too.

    Start of layout

    --- set dx to child.x-parent.x

    --- set dy to child.y-parent.y

    every tick

    --- child: set x to parent.x+dx

    --- child: set y to parent.y+dy

    Would you know any methods to get an object moving along a path that is pinned / positioned? so both the path and the object travelling along it are all synced to a single moving object?

    I hoped the spline path plugins would be of use, but after a point is set, it seems the XY position of each point is unchangeable, so I cant move the path in its entirety and have an object travel along its path between the spline points while the object on the path is also pinned to the moving object.

    I guess the best way to envision it, is to imagine a drifting, floating island that has a car on it, driving around a set path..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is there any way to be able to move or pin the spline points to another object after setting them, so the pathpoints can move?

    I'm trying to find a way of getting a path attached to a moving object..

  • is this plugin available anywhere still? dropbox link is dead..

  • A second delay is a bug in your event code. The pin behavior runs once per frame and typically there is no lag at all. A one frame lag can be possible when using multiple behaviors are used. It’s basically due to the order of behaviors being run. A multiframe lag can be possible in cases of pinning to objects pinned already.

    Anyways you can always just position objects with events. With that you can control when you do it, or even do it multiple times in events if you move object around a lot.

    R0J0hound

    It seems that the multiple pinning was the issue, the family and the object had a pin function.. Thanks!

    Can you be so kind as to give me an example of positioning with events? Now I have things moving smoother, I worry that the pin function, while easy, may cause more trouble when I start adding some more complex attributes...

  • So maybe you have something similar in your game. The solution would be not to use (x, y) coordinates of pinned objects in any events or calculations.

    .

    Noted and fixed. Thankyou!

  • dop2000

    Yet again, thanks for your response..

    I wrote a small standalone example CAP to show an example - , but it didnt happen in that - Then I noticed in the game I am working on, that once the main game loop was disabled (via my pause function) the laggyness was virtually eliminated.

    I also noticed in my game that even though the PIN function was being called in the next event after creation, it wasn't immediately being pinned, in fact it was happening around 1 second after the object was created.

    I know Ashley mentioned that behaviours dont execute in any particular order, so I am assuming it is because of other behaviours.. ?

    I don't really want to send my WIP game over as it's full of graphics, music etc - I'll have to delete a ton of stuff so I can send a small cap..

    Just as a query what is the standard procedure for pinning an object, create then pin, right?? it doesn't need an every tick function or anything, I am assuming??

    Thanks again..

  • I want to pin a large amount objects, once spawned, to a moving object. the objects spawn at various intervals.

    Currently, using "pin" there is a lot of lag and it just isn't working as I hoped it should.

    I noticed one person had an issue with lagging pinned objects and Ashley uploaded an example to dropbox, but the file is gone..

    Can anyone kindly assist or even tell me if lagless pinning is possible?? if not by the pin function, is there another method??

    Kind and humble thanks as always.

  • Ok! Thanks so much for your help!

  • dop2000

    Thankyou, graphics are my strong point, coding skills is most definitely not!

    Now as I understand, this is now an infinite loop? do I need to terminate it somehow?

    Apologies for so many questions..

  • dop2000

    Thankyou for your response, I think I am executing this incorrectly as I only get a row of sprites along one row of X and Y axes..

    I'm not too smart on "For" loops so I guess I am doing something wrong.. <img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very Sad">

    code image below

    https://imgur.com/a/FZHrR

  • Hi all.

    Hope someone could tell me the simplest method of automatically creating a sprite every X pixels until the screen is filled.

    I want to affect each sprite differently once all the sprites are placed, so a tile map is not an option for me..

    Performance impact due to many sprites is not an issue in this case.

    Humble thanks as always!

work3's avatar

work3

Member since 20 Dec, 2007

None one is following work3 yet!

Trophy Case

  • 16-Year Club
  • Email Verified

Progress

17/44
How to earn trophies