lionz's Recent Forum Activity

  • It's a bit quiet here, you could try the community discord construct.net/en/forum/construct-3/general-discussion-7/discord-construct-community-151321

  • The order of layers is done in the layers bar to the right. The z order bar can used to change the hierarchy of objects within the given layer. I don't think the order of layers in the z order matters or has any effect, not sure you mentioned a problem? Are the objects doing something you don't expect?

  • lionz

    From the manual,

    If a trigger is in a sub-event, all of its parent event's conditions must be true at the time the trigger fires, otherwise the event will not run.

    I do remember seeing a post mentioning that triggers should be kept at the top level. However, based on testing and the current manual, I don't think moving the trigger to the top level is necessarily the best solution in this case.

    And yes, filtering/picking first can work better when you're dealing with two different object types rather than instances of the same object type, so that may have been what was happening in your case.

    my point is more that it should just work in its simplest form and it doesn't in this project.

    I have had no problems with sprite + var set on collision with fam then apply actions to the fam in my own projects. So my point is that there must be a fix to have it working with the collision event at the top level not in a sub event but for this project I haven't found that fix even when I chopped down the events to less than 20.

  • lionz My solution works because it picks the instance before the collision trigger is evaluated.

    I'm pretty sure On collision is unordered in C2/C3. Because of that, having On collision and EnemyState = ENEMY_STATE_KICKED in the same event doesn't guarantee the picked Enemy is the kicked one. If Construct happens to pick the other instance for that collision pair, the condition fails.

    It should narrow the picked instances of hitbox to only the ones with that variable set or that's how it used to be and it used to be suggested that trigger events should be used at the top level so adding conditions like that under 'on collision' would be the only way to narrow the pool. I understand what you mean but in the past I never had a problem filtering in that way, it acted like an if hitbox collides with enemy and the variable is set then run the event, as in both the things have to be true for it to trigger.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • By default it should be saving the value if you set them to global variables. When you go between layouts or levels and such the value should be kept. If you want to reset you can use reset global variables action when you hit 'new game' button or however you restart in your game.

  • Here is the chopped down version where the issue still happens. I spent some time on it but can't figure out why unless it is a conflict with family/container. The overlap check does fix it because it runs more often but I would still expect the on collision event to run for each collision.

    dropbox.com/scl/fi/rkv2qtwbs8162mzaio2bj/koopamodified.c3p

  • I trimmed down your project to 15 events and the bug was still happening. For the KoopaHitBox on collision with Enemies I changed it to KoopaHitBox is state 9 and overlapping Enemies and it was fixed. There might be an issue with the on collision event and it being in the same family, which is strange as this method is used to solve collision problems between same object types.

  • is Enemies action a plugin ? you might not be picking any specific Enemy in there unless it works like a function with copy picked. For this one you probably have to share the project.

  • Local storage or save game is how you would do this if you exit the game to restore it on game launch. Since you are talking about within the same game session you can store the data as global variables, they'll keep their value when you go between layouts. Another way is to store all the data in an array object (table) and read from it. When you lose all lives you can run the reset global variables action.

  • Yes that is a standard way of doing this in Construct. It shouldn't affect the performance if it is an empty sprite with no images.

  • I had an issue for a while with setting the cursor from sprite, only to discover that it seems a prerequisite is to first create the sprite in a layout and also that the sprite must remain in the layout and destroying it stops this action from working. It would be good to mention this in the manual as I don't think it is mentioned there.

    Tagged:

  • You do not have permission to view this post

lionz's avatar

lionz

Member since 5 Aug, 2013

Twitter
lionz has 79 followers

Trophy Case

  • 13-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

26/44
How to earn trophies