How do I make Array-based buff system?

Not favoritedFavorited Favorited 0 favourites
  • 5 posts
From the Asset Store
Advanced inventory mechanics for your RPG game (Array-based). Take Items, split them, pick up them, read the description
  • Hi I was trying to make a system where, when a item (like a sword) colide with an enemy, it adds to the enemy's buff array what can the sword inflinct, but it doesn't work, like, I wanted to, when the enemy's buff array has the "Burn" effect, it spawns a fire particle, but its not working.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It is very hard to understand what you are describing.

    Perhaps write it down in a sequences of actions like this, and we can better understand what you want to achieve:

    1) A collides with enemy

    2) Something happens with B

    3) Something happens with C

    etc

  • If i'm understanding it correctly as an enemy status you can use an instance variable on the enemy object or family such as isBurn=yes. Equally if it is a case where the player inflicts burn you can use a global variable.

  • And how I stack their icons on the hud, like, when the player suffer from the "slow" effect, the buff's icon shows up?

  • If the icons are always in the same place then should be easy with the variable setting.

    If they are displayed in a queue then sure maybe an array is better and you display the buff at 0 in first position and at 1 in the 2nd slot etc then if buffs time out and you delete the row then they would move down.

    You can add a line of buff icon objects and match buff icon animation to the buff name at the array position. Many ways to do this and ultimately depends on how buffs work in terms of design.

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