playMaker

Author Topic: Making an attack trigger energy bar Toolkit to lose or gain energy  (Read 1910 times)

euwarnii

  • Playmaker Newbie
  • *
  • Posts: 5
I am using Energy Bar Toolkit in conjuction with playmaker on my game and have a simple question. How do I, on get down of a button of a joystick, keyboard, etc reduce energy game. Similar to rpg games where a special attack or magic attack reduces energy gauge or special gauge. And how do I do the inverse? Where certain attacks build up the gauge. Similar to street fighter basic and special attacks fill up gauge until it becomes a super gauge. Is it possible for the gauge to glow on 100%?

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Making an attack trigger energy bar Toolkit to lose or gain energy
« Reply #1 on: February 02, 2016, 07:30:54 PM »
All you do is have an int var for the bar value- to increase it- you add to it using int add and a positive number- to decrease it you use int add with a negative number-

To have it glow at %100 use an int compare- if %100 do this- etc
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

euwarnii

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Making an attack trigger energy bar Toolkit to lose or gain energy
« Reply #2 on: February 03, 2016, 04:38:04 PM »
Thank you I will implement that. However how do I get these events to occur when player presses joystick button.
I have read you use get button down and set it up as fire1 or joystick0button1 but who do I connect these input actions to the fsm with int var?