xnefarious's Forum Posts

  • 6 posts
  • So I ll try to explain the problem, btw, I've had contrived a way to fix the issue. I ll explain it later.

    I have a Bullet object which subtracts health from enemy bounding box in each collision.

    When enemy's health had gone below 0, I made the Enemy character's animation to play DeathAnimation. And then, promptly to delete the EnemyBoundingBox AFTER the DeathAnimation had Finished. The problem was that, every instance of Enemy was playing animation REGARDLESS OF THEIR INDIVIDUAL INSTANCE VARIABLE when one of the enemies "health" dropped below "0".

    For example: I have three enemies on screen, and when I inflict damage on any one of them, all of them Flash because "The EnemyBox is hit by a BulletObject and that triggers a Flash-in on on EnemyAnimation" so it does what it had been told correctly. This occasion had fooled me to think that all of the enemies were getting damaged when hit by a BulletObject, but it was a façade -- bullet collision only effected the appearance of all, and instance variable data of the instance which was actually hit by the Bullet.

    So, it took me to delete all of the EnemyAI events tied to the BulletCllision and Death triggers to find the issue.

    So, what I did to fix the issue was that, is by Spawning newly created sprite object of DeathAnimation of Enemy after EnemyBoundingBox had been Destroyed (or killed, virutally...)

    I can fairly guess that my explanation is specific to my project and can be hard to understand in general sense of the course of Collisions Logic.

    Had it had been that, if only the EnemyAnimation instance which is Set Positioned on top of the invisible BoundingBox which had been lowered its "health" below "0" to play the "DeathAnimation" -- I would not encounter this issue.

    However, the second option that I contrived it as a fix, is actually more logical somewhow. Yet, how could the Construct's event manager would understand how to play a specific animation when the BoundingBox's juxtapposed Animation instance had been triggered with an event -- for this case when:

    Condition = "

    EnemyBoundingBox>InstanceVaraible:"health"[lessOrEqual)then"0" " >> Action = " EnemyAnim > Set Animation... > "DeathAnim" OR, play an animation when hit by a Bullet. Since, there is no way to tell Construct that: "When BulletObject, on Collision with EnemyBoundingBox >> Set Animation, ONLY the AnimationsInstance which is the most closest to a certain Image Point (BoundingBOx centre most preferably) to play the animation -- doest not exist. And to achieve to only play animations on desired objects would be to stating to their instance variable states, RATHER than to what actually triggers the instance variable data to be altered. Ultimately, I was somehow mistaken to be expecting that when only one of the BoundingBox's "health" value had been decreased to 0, and only the EnemyAnimations instance which is tied to the BoundingBox would play the desired animations -- not knowing that it turns out to be playing the animation on every AnimationsInstances. Was puzzling... Oh, woe is me. Should always work with more than one enemy next time when testing for bugs etc. Thanks lionz for the support!

  • Hello!

    I am currently working on a side-scroller (platformer like) game, in which the Player has to eliminate the enemies, as usual. So, whenever a player destroys an Enemy of same type, they all get destroyed at the same, all of the instances of the Enemy get destroyed.

    How can I destroy only one, or specific instance which I attempted to destroy as a player.

    I highly assume its tied to my Eventsheet.

    I could share my file/eventsheet but that would be a bit long. Maybe there is a prioritisation, which I

    do not know when destroying instances.

    I found this on the forums, but I couldn ot understand it.

    construct.net/en/forum/construct-2/how-do-i-18/destroy-one-instance-object-125764

    In my game player can destroy an enemy if the enemys health (in instance variable) drops down to 0 or less. And when that event happens so, the "Death" animation of enemy plays and after the death anim finishes the EnemyBox(storing the Platform behaviour, which is juxtapposed to the anim) gets destroyed in final.

    Thanks

  • Found it! : C:\Users\(DefaultUser)\AppData\Roaming\Opera Software\Opera Stable\IndexedDB

    https_editor.construct.net_0.indexeddb.blob | 2.86 MB

    https_construct-arcade.com_0.indexeddb.leveldb | 127 KB

    https_editor.construct.net_0.indexeddb.leveldb | 83 KB

    https_preview.construct.net_0.indexeddb.leveldb | 32 KB

    https_account.construct.net_0.indexeddb.leveldb | 4 KB

    Therse are all of the Folders I could find related to Construct 3. The .blob folder is what I assume stores the data of my projects (the rest are Log files), but as I thought, they are scattered in numeral partitioned sub-folders. So, if I were to quickly migrate my Construct projects to another computer which supports the same, Chromium file integration, I may simply backup the "IndexedDB" folder. Rather than to, export all of my projects for downloading as .c3p file one-by-one. Sure, uploading to cloud is the most time efficient (not when Uploading!) and safe way undisputably but I never was keen on real-time saving files to clouds, especially in video games that use Cloud for saving progress -- it just demolishes my internet for 30 seconds as I have slow upload speed on my network. I digress.

    Although, backing up IndexedDB folder and importing to another computer may not works aswell (insert a computer-science pun here!), yet, I really do not want and need to test it out just now. Thanks for the information Ashley! You rock!

  • Hello,

    I cannot figure out where would be the Construct 3 Projects (.c3p) files are being physically stored? There should be some sort of a directory that I can find the files, say like the "cache" folder of my browser. I assume it has to be saved locally in my Browser's directory folder where it saves its databases, cookies etc. , that being, AppData folder in my Windows10 OS.

    I am using Opera Stable Chromium Browser by the way.

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How do I .., "Make my player character (platformer) decrease/increase its gravity for a particular amount of time? Say,I want to make the Gravity of my PlayerCharacter to 100 for 3 seconds when it eliminates a foe when stomping on it.

    Thanks!!

  • 6 posts