0 Favourites

Mana not subtracting

  • 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.

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
378 33,248
part12studios's avatar
Unread hot topic Locked topic
115 17,199
Kyatric's avatar
Kyatric Construct Team Support
Unread sticky
83 102,286
gamearcad's avatar