Hello Guest

Author Topic: Best way to handle player attacking/weapon equipment system?  (Read 3708 times)

aljovidu

  • Newbie
  • *
  • Posts: 3
    • View Profile
Best way to handle player attacking/weapon equipment system?
« on: August 10, 2013, 01:15:49 am »
Heck, maybe not even the best way, but a viable way would suffice at this point. I've spent a couple days wracking my brain over this, trying to get it work well, but... it's kind of iffy, to say the least. Here's the setup:

TK2D combined with 2DColliderGen and 2D Platform Controller(by jnamobile). I'd like to have animated weapon effects (like this: http://powstudios.com/content/weapon-attack-animation-pack-1) joined with the actual weapon's animation of swinging. Of course, I'd like to have some type of collider swinging around with the weapon to register hits on enemies and world objects, as well. In addition to this, I want to have a wide variety of weapons (like an RPG - a bunch of different stats, different effects, etc), so the weapon prefabs have to be stored in an array and instantiated/destroyed regularly, along with the weapon effects being changed based on the weapon that is equipped.

I'm not really looking for specific code snippets that I can copy and paste. I'm more looking for a general idea on how to achieve this. I'm almost out of ideas here and none of them are very viable, it seems. I'm not sure if it matters, but I'm using all placeholder graphics currently, so I'm mostly just looking to get the mechanics working and I can fine tune the details like attachPoints later, once the aesthetic has been nailed down and I can start work on the final sprites.

Thanks for taking the time to read this!