r113 - Function not being called

0 favourites
  • 11 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Bugs only occour in complex projects ^^, and are not rebuildable when trying to reproduce in a new capx...this seems to be an often case here.

    But maybe you can help me. Please check when the AI straight wanders through the right AIMovementBorder, not calling the function to change walking direction...which works fine before.

    The affected event / call is in the sheet "AI_mgmt".

    dl.dropbox.com/u/54216429/Terminator.capx

    So the problem is that the only instance of "enemy" gets a UID 55+ after its variables has been changed in a function before.

    I can't find an error in the buildup, so i guess this is a bug in the UID -> Function Combo.

  • well, i need to bump this...why does the only one enemy get the UID 56 in this project?

  • You bumped this after 20 hours. Sometimes it can take us a couple of weeks before we get round to bug reports since we're very busy. Please be patient!

  • Also, read these tutorials may help:

    http://www.scirra.com/tutorials/361/understanding-uid-iid-health-cards-and-rocket-smoke-trail

    http://www.scirra.com/tutorials/355/making-character-composed-of-multiple-parts

    It maybe a bug, but you need to believe, using UID or IID is not a big deal, specially because what you discovered was cited on these tutorials as a knew issue (and I suggested this read about 2 times for you on this forum, take a time and read tutorials, not only these, on the tutorial section have many good and helpful tutorials.)

  • Thanks for your answers.

    Asley: i bumped because this could be a base bug in the uid system, which 'could' have priority. and if so, i can not continue my (simple) project because this old uid object instancing feature. (so glad c2 currently works on my laptop, and got some time ^^ )

    Should i wait for feedback before continue working (and trying to fix) on the project?

    PS: I think a status indicator would be useful for any bug-report, to get feedback about its relevance, and if you are working on it. Some people are using c2 in a productive environment, and dont have weeks time for eventually getting an answer <img src="smileys/smiley1.gif" border="0" align="middle" />

    : i've been reading this stuff long ago, if i could understand why the uid's does not work in this project, i would not have had posted <img src="smileys/smiley1.gif" border="0" align="middle" /> Please download the capx, and try yourself.

  • It's not a problem with UID, it's your events. Two things. When movementDirection = 2 then event 8 changes it to 1 and then event 9 changes it back to 2. So the enemy will turn right but never left. You need an else in there.

    The other problem is in event 6. When the enemy is overlapping the object or standing next to a wall the change direction function gets called repeatedly. Every tick you'll be switching directions until you move away. So you need a trigger once in there.

    <img src="https://dl.dropbox.com/u/8367729/construct/pics/enemyChangeDirection.png" border="0" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • both point makes sense, thanks. <img src="smileys/smiley1.gif" border="0" align="middle" />

    For event 9, how can i leave the function instead of adding the else condition?

    and for event 6, i guess a "wait" action should fix this too, right?

    at least, do you know why the enemy UID kicks up this way?

  • both point makes sense, thanks. <img src="smileys/smiley1.gif" border="0" align="middle" />

    For event 9, how can i leave the function instead of adding the else condition?

    Don't think you can.

    and for event 6, i guess a "wait" action should fix this too, right?

    Nope with wait you'd just be queueing up many function calls to happen after x seconds because the event is still going to run every tick.

    at least, do you know why the enemy UID kicks up this way?

    Not sure what you mean about the enemy UID. Every object has a different UID, every sprite, text object, etc. You have 55+ objects in your layout so it's not surprising that the enemy UID could be 55 or 56.

  • And deleting (or creating) an object will change the whole UID order too.

  • TELLES0808 - that's only true with IIDs, not UIDs. UIDs are guaranteed to be unique and stay the same for the lifetime of an object.

    Closing as not a bug.

  • so the uid is kind of an internal object counter.

    sorry for the topic, i did not recognize this before <img src="smileys/smiley1.gif" border="0" align="middle" />

    anyway, if i "trigger once" each overlap for multiple enemy instance, it's only being triggered for one of these. the other one walks on. any idea to fix this?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)