Heligma's Recent Forum Activity

  • Thanks for the response dop2000 . I tried clearing it before and it didn't work. I went back to the original template and started again, being more careful this time, and I think it's working now. I think somehow I missed an action in the code so the key name wasn't consistent.

    I have run into another problem now though... When I clear the storage, that key just says "NaN" and doesn't work. I think it's because there's no value being set. So I have to set the value to make it work. I don't know why this would happen though, the code was working perfectly before and all I did was change the name.

    I don't want to post any screenshots because it's a bought template and it wouldn't be fair on the author to post it publicly. If I need more help (which I'm sure I will) I'll PM screenshots if that's ok. Thanks again!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm trying to make a clicker mobile game. I bought this template from the Scirra Store and I'm going through it trying to understand it and modify it.

    I tried to change one of the key names on the local storage and for some reason that key is no longer working (The other keys are still working though). All I did was change the name. I've been through the entire event sheet to make sure the key name is consistent and as far as I can see it should work.

    That's not even the problem now anyway... Local storage is completely broken now. In the debugger it just says "(Loading...)" Screenshot One second it was working, then I toggled an action disabled and it's completely broken. I undid the toggle, tried clearing storage and restarting C2 but it's still broken. I had the same problem when I tried to implement the code into another project.

    It seams once it's broken there's no fixing it...?

    Please help me. I need to fix these issues and better understand local storage because it's a huge part of this project. Maybe there's an alternative to local storage? Any advice is greatly appreciated! Thanks!

  • Thank you so, so much dop2000! That's amazing. I owe you, my friend.

  • Hey dop2000, sorry to be a pain in the ass but I'm still really struggling with this. My mind's glazing over every time I try to figure it out. If it's not too much bother could you make a demo.capx please.

  • Wow! Thanks Yeah I've got a lot to learn haha. I'm still fairly new to C2 and I'm not a programmer, I'm an artist.

    The database would definitely work a lot better but wouldn't it still require hundreds of events? Because I would need a sprite for each weapon, correct? So I would still need to check which sprite the player's overlapping. Or am I being an idiot again?

  • Equipping isn't really the problem, I just need to change the variable number and it will select that weapon from the array. The problem is more to do with which animation is playing. That's why I say it could be done with events checking which animation is playing but that seems long and resource intensive.

    I think if I could somehow get the numbers from the BHT Smart Random plugin, save them to an array or something, I could use those numbers to set the variable. I'm really not sure though. That's why I asked haha

  • Hey guys,

    I’m trying to set up in-game shops for weapons, items and armour. The item shop should be simple because it’ll probably be preset items, it’s the weapon and armour shops I’m struggling with.

    I’m working on the weapon shop first. I’ve set it up so it displays random weapons based on the player’s progression (still amazed I managed to do this without help...). I have a sprite with animations for each weapon, arrays that hold strings (part of the animation name) and the BHT Smart Random plugin to generate the non-repeating random numbers to select a value from the array. The progression system is a simple global variable that ticks up one every time the player hits the end of a level. I’ve just put a “1_” or “2_” on each animation for the weapon levels.

    Screenshot: imgur.com/a/cBTjP

    I’ve already set up the weapon swap system too.

    Screenshot: imgur.com/a/D3Kqm

    The problem I’m faced with now is; How to buy and equip the weapons?

    The only way I can see is to have events checking which animation’s playing (“player” is overlapping “Wep_Shop” + “Wep_Shop” is animation “1_Axe” playing== Subtract 30 from Coins + set “Wep_Num_Melee” to 2) but I’m going to have hundreds and hundreds of weapons by the time this game’s finished. I don’t want hundreds of events just for this system. Is there another way this could be done? Do I have to make it from scratch to do it right? Or is the only way to have hundreds of events?

  • "Boy" - On collision with: "Candy"

    System - Go to Layout: "Layout_Name"

  • Thank you! Figured it out, it's working pretty well now.

    Screenshot:

    imgur.com/LWIvOAR

  • Thanks for the response but how do you add a timer to an object? I'm not sure what you mean.

  • I've been having trouble getting the enemies in my game to attack properly. I've solved a lot of issues by looking at similar questions here on the forum but I still have one problem; They all attack at the same time. The event actions trigger for every instance that meets the conditions.

    Here's a couple of screenshots:

    imgur.com/nd1aiFJ

    imgur.com/rwJNACm

    I have an instance variable on the enemies called Enemy_State which controls their movement and also has the attack actions. The player has a hitbox pinned to them and when the enemy overlaps the hitbox their state changes to attack and they spawn another hitbox that hurts the player before being destroyed. All these damage hitboxes spawn at the same time and the player takes loads of damage suddenly. I want the attacks to be independent.

    Is there any way to have the picked instances carry out the event actions independently?

Heligma's avatar

Heligma

Member since 17 Aug, 2017

None one is following Heligma yet!

Trophy Case

  • 7-Year Club
  • Email Verified

Progress

8/44
How to earn trophies