lionz's Recent Forum Activity

  • 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.

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

  • I can see the issue why it won't turn, you need an Else. When you set direction to 0 the condition below becomes true and it sets it back to 1. It is a common problem that crops up because the user thinks of it as an if/else but Construct actually runs the first condition then the second one because it became true from the first one, adding the Else direction=0 instead means it becomes a true if/else statement when triggered.

  • What you've described should work in theory so it must be a problem with event structure and picking. When an 'enemy' collides with 'family' then in actions you can apply to each individually with enemy actions and family actions to alter variables or make them swap directions and such. Try to keep as simple as possible at first and see if it works because other events can also interfere.

  • For the dialogue can do with instance variable on the npc, so default is 0 - player presses chat button then if var= 0 show text '1', when you next press the button increase the variable by 1, if var=1 then show text '2' etc under that particular npc.

    To stop the player from moving, when you start to chat you can set a global variable to 1 that was 0 before by default. Then under your player movement events add a condition if that var=0, so when it is 1 you cannot move. After chat has finished, set that global variable back to 0.

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