Animation, Movement, Collisions manager

kehwar

  • Posts: 75
I have very basic knowloadge of flash, but have a solid understanding of programming. While making my platformer game i encountered some behaviors that i just didn't like, they worked, but i just didn't like them. Most of them depended frequently on the other and used actor attributes like "onground?". So instead i did these 3 and now all my behaviors are independent from each other, while depending only on these as needed.

Animation Manager:
Saw the one and only on forge, used on the jump and run kit, i thought "this is too complicated" therefore made my own...
- List your behaviors in descending priority.
- In your behaviors replace the "switch to animation" blocks to the "switch" custom block.
- Make use of the "release" block when the behavior no longer is handling the animation. (For jumping, release inmideatly; for walking, release when '<-' / '->' keys are released, etc.)

Movement Manager:
While checking the climbing behavior i noticed how it 'disabled' many other behaviors to make it the only one who is controling the player, guess what, i didn't like it.
- List your behaviors in descending priority, there are 2 lists, one for each X/Y axis.
- Use the "permit" custom block inside your behaviors to ask this behavior if its allowed to handle movement
- Make use of the "release" block when the behavior no longer is handling movement. (For jumping, release inmideatly; for walking, when it stopped; for climbing, when it stopped climbing, etc.)

Collision Checker:
Don't like actor attributes.
- Retrieve from this behavior: _OnGround, _OnLeftWall, _OnRightWall, _OnWallOnly, _OnCeilling, _Colliding, _OnSlope

* The use of the "release" block is necesary 'cause the manager can't tell when the behavior stopped using the animation/movement. This may seem complicated for some, for me, it allows me to personally tell "when" it have to stop within the behavior.