Santhenar's Recent Forum Activity

  • R0J0hound

    Worked a charm!

  • R0J0hound

    Thanks!

    Sounds like a plan!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a condition which is

    Sprite width < 5

    Destroy sprite.

    (Wanted a screenshot, but imgur is down)

    Surely this should only destroy sprites whose width is less than 5 pixels, but when the width of one sprite drops below 5, it destroys 80% of the sprites.

    Here's a capx if you like:

    dropbox.com/s

    vc3geyox3dqpmt0/line3.capx?dl=0

  • It's not the tidiest capx in the world...

    dropbox.com/s

    duti0pbjm8j7k1j/lines2.capx?dl=0

    Click mouse to create paths

  • I found a different way of doing it

    Thanks for your help!

  • Okay I think I'm beginning to see what some of the problems are here.

    It works when there is only 1 sprite in existence, but when more are added it starts to break down.

    This is because when it is calculating distances or toggling variables it is doing it for all instances instead of one at a time.

    So IF sprite distance < 10, toggle boolean to true.

    When ANY sprite is close to a node it sets the boolean for ALL sprites.

    I suppose because the distance check is running as a system action, but it doesn't seem possible to run a distance check as an object action... Is it?

  • jojoe

    Point taken <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" />

    Hope this works.

    dropbox.com/s/i6qi9gwhq3ro1 ... .capx?dl=0

    Arrghhh not enough rep!

    dropbox.com

    s/i6qi9gwhq3ro111/

    lines.capx?dl=0

  • This is really messed up...

    System - distance(Sprite.X,Sprite.Y,Sprite.PathX,Sprite.PathY) < 10

    set sprite.x to pathX

    set sprite.y to pathY

    When the less than value is set to 10, the object never teleports.

    However, when the less than value is set to 5, it does.

    How does that make any goddamn sense at all?

  • Thanks guys!

    Using int(sprite.x) makes it work about 80% of the time.

    But that reduces as soon as I increase the speed above 1px.

    I did already try and put in a function which would calculate the distance between the object and the finishing point and teleport it if it got close enough, but it's pretty ropey.

    It goes

    System - distance(Sprite.X,Sprite.Y,Sprite.PathX,Sprite.PathY) < 10

    set sprite.x to pathX

    set sprite.y to pathY

    But it it always triggers regardless of distance. Not sure what's going on there.

    I'm afraid a capx probably won't help, it's quite messy at the moment

  • Hi,

    I have a very simply trigger which I do not know why it is not firing.

    My object has 2 variables: PathX and PathY. The object moves towards these coordinates at the rate of 1 pixel (for testing)

    When it arrives it should trigger an event.

    The conditions are:

    PathX = Sprite.X

    PathY = Sprite.Y

    Yet the event does not trigger.

    If I replace these conditions with OnKeyPressed, it works fine, so it's not a problem with the event. I'm really baffled and it must be something simple I am doing wrong.

  • Alright!

    It's still a bit weird but seems to be working to some degree.

    To help anyone else out: It only works in the following order:

    System - Pick All

    Object - Pick instances where not equal to UID

    Object - Pick nearest

    Now that I read it that makes sense. Thanks!

Santhenar's avatar

Santhenar

Member since 24 May, 2013

None one is following Santhenar yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies