Headbang Games's Forum Posts

  • Why not, i am making an adventure game and i got a main character, i don't want to have a different instance of it on each layout and i don't want to create manually on every layout, it make sense to make it a global object and you can't make an adventure game without pathfinding and i never made a game without at least 6 layouts

    But again just to make it clear for Ashley , this bugs also happens when i call stop and the object is NOT global and without switching layouts.

  • Here you go, i had this problem too and almost cracked my head over it, the problem is that flood fill can not work with non integer numbers, so add int() to your X and Y values and also using "red" as a color won't work, you need to give the color code or use rgb.

    [attachment=0:34d1nr3c][/attachment:34d1nr3c]

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ...and a sacred work it is!

    God speed and god bless!

  • Well i check it and it doesn't reset to zero on stop even if the object is not global, besides as i said before this also happens without switching layouts.

    I just added this.s=0 to the stop function on the runtime and it fixed the problem and also as you suggested the expression does reset back to 0, so for now i am covered, thanks.

  • Ok i can messure it with the expression instead.

    But i still think its bug...

  • You can see it in the capx

  • The official speed condition of the path finiding behavior.

  • Ashley is there any reason why you are not setting the speed to 0 when calling the stop function?

  • ok so i looked in the plugin and basically i need another stop action that also does this.s = 0;

    but i don't want to modify the official plugin on my own.

  • and besides if you stopped why is your speed at 200 it should be 0, that's another way to fix the problem.

  • that's why i suggested another action for clear path

  • The problem is not with the object being global, i just checked it now, if i call Stop on the same layout the object is still on has path=true and speed 200.

    the stop action should reset these parameters or alternatively another action for clear path.

  • Pathfinding stop does not clear path

    ____ When using the pathfinding behavior on a global sprite, when switching layout and calling Stop, debug shows pathfiniding Has Path is still true and speed is not 0.____

    Attach a Capx

    ____ [attachment=0:24sw099q][/attachment:24sw099q] ____

    Description of Capx

    ____ Moving a global sprite using the pathfinding and switching layouts. ____

    Steps to Reproduce Bug

    • Touch the screen to move the sprite (sprite will change color when speed is > 5 and reset when speed is back to 0.
    • Press 1/2 on the keyboard to switch between layouts 1 and 2.

    Observed Result

    ____ Calling Stop pathfiniding on the start of layout stops the sprite movement but the sprite is still playing the walk animation and has path=true, speed=200. ____

    Expected Result

    ____ Stop should clear the path from the memory or should have another clear path action. ____

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    ____ Windows 7 SP1 ____

    Construct 2 Version ID

    ____ 168 ____

  • You're welcome,

    btw, this has already been implemented in the official plugin, so i suggest you use that.

  • Great! thanks, it helped!

    I thought that this param only applies when Rotate Object is set to YES, it didn't even cross my mind to check it!

    Thanks again.