Mana not subtracting

0 favourites
  • 3 posts
From the Asset Store
Can be used in Games as Mana,Potion,Special Power, Health Pickup
  • I'm really not sure why but when I cast a spell the mana does not consume, I have it set when a character clicks on an object it "casts" the spell (either left click or right click). I have the action:

    Player | Subtract SpellBullet.ManaCost from Mana;

    but it does not work at all, it's strange because I have:

    Player | Toggle notCastCD

    just above it but it works fine... also putting an append text box into that event seems to not work at all either. I may have some redundant events or actions but this is still a work in progress and I've not yet went through and optimized things yet nor have I started creating custom textures...still borrowing from others for now.



  • I can't tell you for sure, what's going wrong.

    What I can tell you is that you really should use sub-events (How events work).

    I'm pretty sure a strict reorganisation of the code and less splitting/includes (you really don't need to split the code so much) will help settle things down.

    For a better organisation readability of the code, use groups.

    There's not much to be done there to help but massively rewrite the whole thing, which I'm not willing/able to do right now.

    With a cleaner structure, the code is likely to behave as expected.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm just making this as a learning experience, thanks for the advice. I'll have to take a look at that when I get to work :)

    I've read a bit and basically I'm still using C++ OOP logic. Using event sheets like header file includes are not the same, like class inheritance? I guess I really don't understand the logic at all of Construct 2. I'm trying to understand the logic but I really have no idea. I thought I was doing pretty well *shrugs* oh well.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)