Metallian 94's Recent Forum Activity

  • Ok, I made an array system where the changing array values co operate with instance UIDs to determine each masks instance variable.

    However I'm doing something wrong when I'm saving the array or loading it, maybe both, I'm not sure, but either way the array values don't load. I was prepared for that arrays have to be dealt with differently than global variables when it comes to saving or loading. Here's how I tried to save and load the array. Can you help with this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • A solution that comes to my mind, would be adding an image point to the position where the sword hits on the attack animation's last frames and sticking a small invisible sprite in it, which would then spawn particles on enemy collision.

    Go to the hero's sprite editor and add an image point, set it in the position you want, in this case select the frame where the sword hits and set the image point to the sword's tip.

    Then create a small sprite and make it invisible from its settings.

    Every time you hit, make the hero spawn the invisible sprite to the image point you made earlier. If you want to be exact about the timing, compare the frame and select the one where the sword is supposed to touch the enemy. Start a timer, to destroy the invisible sprite some time after the hit is finished.

    Check if the invisible sprite is in collision with the enemy and if it is, make it spawn the particles.

    So basically the blood comes from the hero sprite, not from the enemy. I'm not sure how well this solution works and I haven't used particles myself before, but this is what came to my mind first.

  • Thank you for the reply!

    I know my code might not have made sense, but I wasn't really sure of any of my solutions. It was experimenting based on what I knew and understood and in the first attempt's case, I just kind of thought "For each" would individually treat each mask instance, to set each ones correct instance variable, but good to know that's not the right way.

    I can't rely in global variables alone in my case. Collecting masks does add up to a certain global variable, but I also need to have some variables that affect the masks themselves, to be able to change their states, because these are special collectables. Unlike more generic things like coins, with the masks, if the player has already collected one instance, they should not be able to collect it again (until they start a new game of course). I want each to disappear or change frame on collecting and stay that way on a loaded game.

    I will try the array next, despite being new to that feature too. I'll do research for it and combine my new knowledge with your advices.

  • Hi, I’m in a need of help. After a year long break I’ve continued my project’s development. The progress has been good, until I tried to save some instance variables for the state of collectables.

    I first tried it the same way as I previously had done with global variables (successfully), as shown in the pic below. The instance variable I’m trying to save is BmaskCollectedNum, the variable for the collectable mask’s state, which turns from zero to one when it’s collected. This solution did not work, the masks changed state would not remain when closing and reopening the game.

    Next I tried using dictionary, because it seemed a common variable saving method, based on what I read from other threads about variable saving. I’m completely new to dictionaries, so I tried to understand them by studying the code of a metroidvania game template I bought from the Scirra asset store years ago, which heavily relies on dictionaries. The result is shown below and it still didn’t work. I guess I don’t understand dictionaries enough to know how to properly use them with instance variables.

    Any help is appreciated.

    And by the way, thank you very much for helping me know how to save global variables to local storage years ago. Sorry I forgot to reply to the last post. Saving global variables is no longer a problem, now I’d like to know how to do the same with instance variables. I actually tried to start this as a reply to my previous thread from two years ago, but the site didn't let me, so I made a new thread instead.

  • You should check out this video from Jerementor's 2D platformer tutorial series. It shows how to make a pretty similar boss that moves sideways and jumps every once in a while.

    youtube.com/watch

  • Hi, I’m making a prototype base for my future game project, which currently has 457 events. It’s been going decent, until I tried to program a save system with Local storage.

    In it’s testing state the game has four levels, which are accessed through level buttons. Each one has two instance variables, ”Unlocked” (a boolean which defines is the level unlocked) and ”Level”(a number of the level layout the button leads into). In the beginning only one level button is accessible, but every time you beat a level by touching the ExitPortal, depending on the portal’s ”UnlockedLevel” variable (of the next level to be opened), a new value is set on the global variable”LevelUnlockCountGeneral”, which (depending on it’s count) opens the next level, turning it’s ”Unlocked” to positive, while the prievously unlocked levels stay open too of course. Pressing M saves by setting the key ”UnlockedLevels” to ”LevelUnlockCountGeneral”.

    My objective is to be able to save and load the ”LevelUnlockCountGeneral” as well as the instance variables under it’s control, through the main menu with the self explaining ”New”, ”Load” and ”Exit” buttons. Here’s what I did.

    I tested the game and proceeded normally, unlocking the levels. The problem came in, when I saved and returned to main menu to try loading the last state. The level buttons for the unlocked stages weren’t working except for the first, which is open by default. When I played it and touched the ExitPortal, nothing happened as if the global variable wasn’t reacting. I checked debug and reproduced the problem. It turned out that after pressing ”Load”, the box of ”LevelUnlockCountGeneral” wasn’t showing any value, but instead a word ”NaN”

    Why it’s unable to load global variables? How are they usually handled in these situations? Despite the title I'm not restricted to use just Gvariables and Lstorage, any help to achieve the right outcome is welcome. These tools are just what I used first, because I prefer to use methods which I can understand myself.

  • Ok, so I made this test in which you got a cube with a platform behaviour, cant be much simpler than that.

    https://www.dropbox.com/s/qhaqelz7u76py ... 1.zip?dl=0

    I actually was able to export this one, so I guess it proves you that I can export something. But I still need to be able to export projects, like the prievous one. I even was able to do that with my old PC.

    Ill see if I can find the older versions of my game to try and export them one by one. Those files are lost somewhere since I havent really needed them until now, as I was able to export the newer ones on my prievous PC just fine.

  • I tried the latest release without difference. The only addon Im using is Spriter, but I need that, its a requirement for my project. I tried to export smaller simpler projects too but the problem is repeated, no matter what project Im exporting. Also I could export the same ones with my old computer. The problem happened, once I used C2 on my new PC for the first time.

    I couldnt find any tech support forum, so I assumed this was the right one, but Im not here to point out a general problem on C2, since no one else has this. I just need personal help to be able to use C2 normally again.

  • Problem Description

    ____ Im currently unable to export my projects. Every time I export to NWJS, the export loading starts normally, but after a while my screen goes black for some seconds and I get the "Construct 2 has stopped working" message. I also tried to export on HTML5, but that didnt make a difference. ____

    Attach a Capx

    ____ https://www.dropbox.com/s/vz0csxtmezsw7bx/0511.zip?dl=0 ____

    Description of Capx

    ____ Its my project, which itself hasnt anything wrong but crashes during exporting. Its the same with any project. ____

    Steps to Reproduce Bug

      The normal steps of exporting any Project, by clicking file, Export Project, choosing any export platform that can be viewed in desktop and there it goes.

    Observed Result

    ____ The engine starts loading the export normally, but after about a minute my screen goes black for a couple seconds and I get the "Construct 2 has stopped working" message, after the short loading screen, where Windows tries to find a solution.____

    Expected Result

    ____ Id expect my projects to be exported normally. ____

    Affected Browsers

    • Chrome: (YES/NO)
    • FireFox: (YES/NO)
    • Internet Explorer: (YES/NO)

    Operating System and Service Pack

    ____ Windows 10 Home 64-bit (10.0, Build 15063) (15063.rs2_release.170317-1834)

    I attached my DxDiag.

    https://www.dropbox.com/s/jbgjgl12wrwj1 ... t?dl=0____

    Construct 2 Version ID

    ____ Release 244 (64 bit)____

  • Right! There it is. I have ignored many C2 updates, so Im not sure how compatible this is with your versions. Well Ill send a video if theres need for that.

    So some instructions: use A and D to move and W to jump. You can doublejump and control the height depending on how long you hold down W, on both the first and second jump. Move to the left on the platform and the Spriter beast should appear. Start by jumping on the blue crystal platforms, that float above her spiky tail. Dont go on the tail, because it hasnt got solids, youll fall through. From the third platform descend on her back to the upper or lower shell (dont be afraid of those spikes, I havent programmed them to hurt you yet.) Try simply standing on the back and once the rapid animation switching starts, try to doublejump multiple times. Youll see that it plays the doublejump animation (the flipping one) first, sometimes you cant perform the second jump and sometimes you cant even jump at all. By pressing G after the monster has appeared, the monster starts another animation and also starts moving/flying left. For some reason this sometimes works and sometimes not, but right now the main problem is the jumping on the monster.

    BTW that snowman is just a test dummy for all my platformer based games. Im not planning to plagiate the legendary lack of limbs feature of Rayman.

    https://www.dropbox.com/s/oxgqd9krozg3b ... s.zip?dl=0

  • Last spring I found out about the advanced scon exporting of Spriter animations, I was thinking to create a platformer with massive bosses, that would require the player to climb on them to defeat them. The technology makes C2 to treat the giant monsters parts as separate objects, for which I can individually attach "solid" behaviors, I can make some spikes on the back dangerous etc. It makes the boss basically a mass of moving platforms, that move horizontally, vertically and diagonally.

    The problem I faced is that when my character is standing on a platforms/parts surface running or standing, its gravity somehow cant keep up with the platforms movements (even when they are pretty slow). Im not completely unable to advance forward along the parts/platforms, but the issue causes my character to often rapidly switch between standing on the floor and being in the air. This shows in the animations with the standing and jumping animations switching in a flashy way, like a hundred times in one second.

    The problem ruins the way the game looks as described, but it also ruins the basic gameplay, because sometimes when I need to doublejump, Im unable to do it because C2 thinks I was already in the air, so it does the second jump first.

    I need your help.

  • Keeping it under a GB in single layouts, got it! This info helped a lot, thanks for the replies!

Metallian 94's avatar

Metallian 94

Member since 13 Oct, 2016

None one is following Metallian 94 yet!

Trophy Case

  • 8-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

10/44
How to earn trophies