Behavior help: Get powerup.

Rawr

  • Posts: 85
Well, I know how to do the health and invincible for stage powerups, but that's about it.
I'm asking about other stuff, like things you collide with to enable actions, ex. double jump, get new weapon or such.

Anyone?

Hectate

  • *
  • Posts: 4645
The way it works is you give the player the ability in your behaviors, but don't enable it unless a game attribute is true. Then, just set it true when they get the powerup.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

Rawr

  • Posts: 85
Okay, I got that to work.

But how about weapons?

Hectate

  • *
  • Posts: 4645
Depends on the weapon selection. If it's all melee, you could just change the animation depending on the weapon and use attributes for the stats (damage amount, range, etc). When the player switches weapons, cange the attributes to match their new weapon.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

Rawr

  • Posts: 85
What if I want to use a different sprite for each weapon?

I currently use the weapon animation handler in the run and gun example.

Hectate

  • *
  • Posts: 4645
I've not used that kit/example but from what I know of it, that is exactly how it's designed to be used.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

Rawr

  • Posts: 85
Well it handles the graphics fine, but using it kinda means you enable every weapon at the start of the game. ::)

Hectate

  • *
  • Posts: 4645
Someone else will have to help you with the kit then, I'm not familiar with it, unfortunately.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.