plopix's Forum Posts

  • 10 posts
  • Thanks, I'll have a look about plugins, but I managed to workaround my problems by switching like you did (and adding exceptions).

    And I definitely should use more functions.

    Btw I reported the vanishing sprite bug.

    Thank for you answer !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Problem Description

    When an object bounces while following a path, it vanishes.

    Attach a Capx

    I am not allowed to post links

    but you can take off the space from

    nacht.free. fr/public/speed0Bounce.capx

    Description of Capx

    the file shows 2 sprites colliding and bouncing while one follows a path and has a bullet speed of 0.

    One sprite disappears.

    Steps to Reproduce Bug

      Two sprites sprite 1 and sprite 2 have bullet behavior. Sprite1 has pathfinding behavior. There is an event that makes Sprite 1 and Sprite2 bounce off each other on collision. At start, Sprite 1 sets its bullet speed to 0, and disable its bullet behavior (last step is optional). He then finds a path to sprite2 and follows it. On collision between sprite1 and sprite2, sprite1 disappears.

    Observed Result

    Sprite 1 vanishes, its X and Y are NaN, making it invisible on screen.

    Sprite1 keeps on following a path endlessly.

    Expected Result

    Sprite 1 should not disappear. This does not happen with the parameter "bounce off solid", only with an event with "bounce off object". This also happens with bullet disabled.

    If you disable "set speed to 0" in the file, it does not happen anymore even though bullet is disabled.

    I think that it should work like with "bounce off objects" parameter on (bouncing is ignored in this case).

    Affected Browsers

    • Chrome: (YES)

    Operating System and Service Pack

    Win7 SP1

    Construct 2 Version ID

    latest (r203).

  • Hello ! Thanks for your answer.

    This fixes the capx, indeed, but in fact in wouldn't work in many cases, like in my project. I updated my capx to be more like I use it in my game, and the fix cannot work anymore since the bounce event picks a family that does not have the pathfinding behavior (but sprite1 from this family has it).

    nacht. free.f r/public/speed0Bounce.capx

    I know that I could use exceptions ("do not trigger with this kind of object",...) but that wouldn't be very clean, and I'm sure there can be a way to properly prevent conflicts without having to deal with each different case for each object.

    The capx is just an example of those problems I met, how do I manage pathfinding with several object with bullets and bounces, but there are more, like bullet speed and pathfinding speed seem to add to each other, but I found nothing about it.

    Pathfinding and bullet are very useful behaviors, so I guess that many people use them both, but I couldn't find anything about the cohabitation of those two, and it causes many problems. So this is my question, do you have a method, or is there a proper way to make them work together ? Or is there some documentation somewhere ? Is this simply something to avoid ?

  • Hello !

    I'm using in my project a sprite that has both pathfinding and bullet behaviors.

    I guessed that making them work together would not be simple, but it seems that I was underestimating the problem.

    So how do you make pathfinding and bullet behavior work together ?

    I tried to disable bullet speed while the sprite is using the pathfinding, but it does not seems to work with bounces (the sprite still bounces on contact with solid even though the bullet behavior is disabled).

    I tried using bullet speed to 0, too, but that makes the sprite vanish !

    I could make bullet and pathfinding work together, but then it causes some issues, like the sprite losing its path, and turning in circle past some speed.

    In this file you can see part of the problem: sprite vanish when colliding while moving along its path and colliding with bounce and speed = 0 (although bullet is disabled), and sprite 1 still bouncing on sprite 2 if you disable "set bullet speed to 0" in sheet 1, although bullet is disabled, too.

    (I'm not alowed to publish links yet so

    nacht. free.f r/public/speed0Bounce.capx

    just remove spaces)

    So my question is not how to workaround this case in the capx, but it is how do YOU make bullet and pathfinding work together with the same sprite ?

  • Thank you littleStin tha'ts perfect !

    I was looking in regex, but this was in fact much simplier.

    Korbaach, that's interesting. This is much more complex, but it reveals some interesting tricks, thank you.

  • Hello !

    Maybe I did not searched with the proper words, but I cannot find a way to check if a string contains some text.

    For example I would like an event like this one:

    variable1 = "sometext"

    if variable1 contains "text" return true.

    Is this possible ?

  • Wow thank you so much, that's something from previous tests I forgot to delete !

    Thanks! Give that man another medal !

    I'm sorry that this was all my fault, and since I don't know the software so much I thought I was just using it wrong.

    So if you saw something in the code that was not the proper way of doing it please let me know !

  • I managed to open your file Volkiller. Thanks.

    But indeed, this is exactly what I am doing.

    Here is the complete project if someone want to have a look.

    Edit: oops it seems that I am not able to publish links for the moment...

    nacht. free. fr/test/Antz/test.capx just remove the spaces

  • SpongeHammer> I tried the other way around, but it is still the same.

    Thank you Volkiller, but it seems that I cannot open your project (it says my version is too old but it is release 200, isn't it the latest one ? )

    The project is not very big, I checked all events but this is the only one with "portablestuff" in the conditions.

    All the event with portablestuff are: spawn, pin, and on collision.

    I checked the collision points, but I found nothing unusual with them.

    This is what is happening: everything is working as it should, but once one of the portablestfuff instances touches the object queen, every instance of portable stuff is destroyed.

    Is it possible that it might be a bug?

    I had very strange things happening with an else event that was not working properly with the same project.

    I can provide a link to the project if you want.

  • Hello there, I am new to Contruct. I used to use Stencyl, and the logics behind both of them are very different. So I am having a bit of hard time for simple things sometimes. Please don't judge.

    My problem was so simple that I'm helpless. It fits within this little image:

    I simply want the "portablestuff" instance to be destroyed. I don't understand why it does not pick the instance that the obkect collided with.

    PortableStuff is an object that is spawned then pined by an other object. This event is not a subEvent.

    I guess I coud find some work around with some instance variable, but since I'm am learning how Construct works, I would like to understand why this line is not working.

    I've looked upon the forum, but each time the problem was different, and not related to mine. So what am I doing wrong ?

  • 10 posts