How do I make a Status Effect system?

0 favourites
  • 3 posts
From the Asset Store
Health System
$9 USD
10% off
Plugin to easily manage the health status of objects
  • In my game, you can give (and get) status effects in battle.

    For example, you can cast a spell that costs a small amount of Willpower (My Game's Mana/Bro Points/ect.) to give a sleeping foe a nightmare that'll damage them every turn until they wake up.

    I was thinking about a "severity" factor that'll cause a D.O.T to deal more damage, a STAT up/down that makes you temporarily... You get the idea now?

    Say... a Lv 2 Enraged will cause a foe to hit harder but like the "base" Enraged they can only attack whoever made them angry and aren't allowed to use most skills. (Jane, the first person you fight being an exception, as he gets to use a move that he can only do when Enraged.)

    And if I put in a "check" system that lets you check on a friend or foe, a Lv 2 Asleeps' comment would say "This guy looks like he's going to be asleep for a while..." as opposed to a Lv 1's "Taking a quick nap, I guess."

  • Give each player/enemy an instance variable for each type of status effect. Run them as Type Number - since you plan to have levels of each type - instead of as booleans. If defenseBreak = 1 defense=defense*0.6 // If defenseBreak = 2 defense=defense *0.45.

    Depending how your game works you would want a minimal of 3 checks

    - Before attacks to check if effects stop you from attacking or effects effect who you should target. (Ex. if you're asleep you don't get a turn, if 1 of 2 enemies is asleep you hit the awake one -assuming auto fighting).

    - When getting hit - for any effects that change damage - defense break

    - Damage check/Effect drop - End of each Turn type of thing - or if real time then every x seconds to tick off things such as poison or buffs timer ending

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, I programed my Status effects as number variables to tell how many turns they will last for.

    I think I'll put everybody who gets to be in a brawl into a Family so I can easily give everybody their status effects.

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