ZeldaVerde's Recent Forum Activity

  • No. Imagine room A has no enemies, room B has 2 mice enemies, room C has a bat boss enemy, and room D has 2 of the same bat enemy which are different instances of the same object as the boss, which now that the player is better and has more abilities are therefore as easy as a normal enemy was at the beginning of the game. Player starts at room A, and all enemies are destroyed instantly. Player then moves to room B. The game destroys every enemy and recreates the mice for room B. The player kills one of the mice then returns to room A. All enemies are destroyed again and the game tries recreating the enemies for room A, but there are none, so nothing happens. Player returns to room B, all enemies are destroyed, and room B`s 2 mice are recreated (no matter if the player killed them). Player proceeds to room C. Every enemy is destroyed, the boss bat is recreated, and the room is sealed. The player then defeats the boss and the room is unsealed. Player proceeds to room D. All enemies are destroyed and room D`s bats are recreated, one of which is killed by the player. Player goes back to room C. All enemies are destroyed and the boss is not recreated (but if there were another enemies in the same room, they should have been). Player then goes back to room D. All enemies are destroyed and both bats in room D are recreated. That`s the behavior I`m looking for, but I don`t know how to tell regular bats apart from boss bats not to recreate them. Is it clear? To be honest, I solved this problem by making it so the boss only spawns when the player reaches it`s room, and by not placing it on the layout initially, so it isn`t recreated. That said, I still want to know if there is a way to recreate objects based on if they initially had a bool set to true or something, as this will probably still be of much use, or maybe by whether or not they would meet a condition after recreated. If not, in case the Construct gods are listening, a feature like this would be much appreciated.

  • My game is divided in rooms to which the camera scrolls when you enter them, just like 99% of metroidvanias. For this, I have invisible sprites that represent the limits of a room for detecting where the player is and where the camera should be. Every time the player switches rooms, I destroy every enemy and recreate those from the room the player is now in using the coordinates of said sprite. And that's why it's not that easy to implement a solution like that.

  • Thanks! That explains the inconsistencies.

  • I know I can select an area, but I did it in an automatic way that can't easily accept an exception. What makes me feel it's bad practice is that I'm uselessly creating and immediately destroying an object for lack of a better way to do it.

  • Then maybe just

    On created

    Is not IsRespawnInfinitely -----> Destroy

    But again, this feels like very bad practice. It sure would be nice if construct would add a way to only recreate objects that met a specific condition on their original properties. Do you think I'm maybe just too bothered with this "bad practice" thing?

  • Bro, by area I mean room. I don't have like, a forest area, an underwater area... all in one Layout, no. I'm just talking about rooms, the enemies should respawn when you enter a room again. I didn't mean to be mean to you when I said it felt like bad practice, I'm very thankful of your help actually, I really am.

  • Persist would make it not come back when reloading the layout, not when I use the "Recreate initial objects" action. My "Areas" are not different Layouts.

  • I tried testing myself but got confused by the results. I wasn't sure if it was triggering straight away as you said or if it just happened that Time was a multiple of 8 at that time. I wasn't really considering this possibility because I don't think it makes sense. Thanks for the help tho (:

  • Feels like a bad practice

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm very thankful of your attempt to help me but I'm afraid you didn't quite get the situation:

    I have an enemy (an object), which will sometimes be used as a boss and sometimes as a regular enemy (they will be different instances of the same object). My boolean is "IsRespawnInfinitely". My game is a Metroidvania where, when you go to a new area, all enemies that were there respawn (and the ones from the area you were in are destroyed) using the "Recreate initial objects" action. There is an Area, a single room, in which there is a boss the player should only be able to fight once, but is the same object that will then be used as a normal enemy in the future. Instances that have this bool set to true should act as normal enemies, and respawn and be destroyed according to whether the player is going to a new area or not, but an instance with this bool set to false should not be affected by any of this. Therefore, I wanna know if there is a way to check for whether the bool was true or false for an instance of an object that is currently destroyed, so I have a way to identify if this is an instance that should be recreated or not.

  • Consider the following situation:

    Space is Down

    ------Every 8 Seconds ----> <Action>

    If Time = 6 when I press and keep holding space, will this action be run at Time = 8 or will it run at Time = 14?

    Tagged:

  • It's not that relevant, it's just that this boss, later in the game, will be a regular enemy, so the regular ones should respawn whenever their initial position is on-screen (which is already set up) but the boss one should only be fought once, so I created a boolean only that instance has true, but don't know how to make it so enemies with that set to true won't be recreated

ZeldaVerde's avatar

ZeldaVerde

Member since 11 Nov, 2018

None one is following ZeldaVerde yet!

Trophy Case

  • 5-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

8/44
How to earn trophies