Post by vyckstjudas on Dec 20, 2012 0:01:51 GMT -5
Intro: In Capcom beat'm ups, ever notice enemies which comes, attack then leaves? There is no official term for them so I use striker term cause they act just like King of Fighter's strikers.
This tutorial desribes how to make such striker. However, since striker is not 100% stable, this tutorial will only desribe simple striker which is stable enough.The instability issues will be explained in detail in Issue below.
One thing to mention is that strikers are optional enemies. Players could kill them or just let them go. When they are let go, 'offscreenkill' command will remove them when they are offscreen far enough. That's why you have to make sure to use latest OpenBoR version cause that command is not supported in old version.
Procedure: As mentioned before, striker comes, attack then leaves so that means the striker needs SPAWN animation for the coming in animation. For the attack animation, it can be added after the coming animation in SPAWN or in seperate ATTACK animation. Here's an example for the latter:
name FlyOctiS
health 1
nomove 1 1
type enemy
death 1
cantgrab 1
candamage player obstacle
offscreenkill 100
anim spawn
delay 10
offset 44 90
jumpframe 1 0 1 0
frame data/chars/enemy/idle1.png
frame data/chars/enemy/idle2.png
bbox 12 18 68 63
frame data/chars/enemy/idle3.png
frame data/chars/enemy/idle1.png
frame data/chars/enemy/idle2.png
frame data/chars/enemy/idle3.png
frame data/chars/enemy/idle1.png
frame data/chars/enemy/idle2.png
frame data/chars/enemy/idle3.png
frame data/chars/enemy/idle1.png
frame data/chars/enemy/idle2.png
anim idle
loop 1
delay 10
offset 44 90
bbox 12 18 68 63
frame data/chars/enemy/idle1.png
frame data/chars/enemy/idle2.png
frame data/chars/enemy/idle3.png
anim attack1
loop 1
range 0 400
rangez -200 200
delay 20
offset 44 90
jumpframe 0 0 2 0
bbox 12 18 68 63
attack 41 17 44 67 10 1
frame data/chars/enemy/attack.png
anim death
delay 200
offset 44 90
jumpframe 0 3 -2 0
landframe 1
frame data/chars/enemy/fall1.png
delay 100
frame data/chars/enemy/dead.png
This striker is simple cause it only has 1 HP which means it will die if hit by any attack. It will also play DEATH when killed because of 'death 1'. Animations such as PAIN, FALL and RISE aren't required.
'cantgrab 1' is set to prevent players from grabbing this enemy.
'nomove 1 1' is set to make striker just perform the attack and won't try to walk at all.
'candamage' is set to player and obstacle. The former is obvious, the latter is so striker will also destroy obstacles if it meets any.
'offscreenkill' is important. It is required to make the striker disappear after going offscreen. 100 is chosen so striker will immediately disappear when it is 100 pixels offscreen, left or right. That also means this striker should be spawned less than 100 pixels offscreen to avoid being removed right after being spawned.
About the animations, SPAWN animation holds animation when striker comes. It will stop after animation ends. Then it has ATTACK1 which has wide and long coverage. The idea is so striker always find player and attack after coming in. Well, if there are no player, it will just stay still but it's good thing cause there's no need to attack when there's nothing to hit right? .
In ATTACK1, there's 'jumpframe' which moves striker forward. The animation is looped also which make striker moves continuously to other screen edge. After it goes beyond offscreenkill value, it will disappear.
Here's an example to spawn striker:
spawn flyoctiS
map 2
coords 370 190
at 100spawn flyoctiS
map 2
flip 1
coords -50 210
at 100
Notice that both striker are spawned 50 pixels offscreen. Don't forget to set 'flip' properly so they enter the screen instead of going out.
That's one way to make simple striker. Striker can do anything after coming but make sure it goes offscreen cause players can't be forced to kill striker.
Expansion: There are lots of way to expand the striker but you might need to use script to perfecten the striker. These are couple possible expansions:
1. Instead of charging forward, the striker could shoot or toss projectile in ATTACK1. After shooting or tossing, it could move away offscreen to leave. Combine 'loop' with 'jumpframe' for the leaving effect.
2. Strikers could act just as item carriers. They don't need to have attackbox (nothing wrong if they have though).
3. Strikers could be living time bomb. These type don't need offscreenkill but lifespan instead. Add explosion in DEATH animation and they are set!
4. Alternate ATTACK animation could be added to give alternate attack for the striker making it less predictable.
Aside of using ATTACK animation, striker could just use SPAWN animation for the come, attack then leave actions.
If you want to make striker which leaves from where it comes, you might need script to make sure they go to the right way after attacking. FYI enemy automatically turns if player is behind him/her that's why script is required.
Issue: The simple striker above is actually not 100% stable.
Here are couple instability issues, most of them are about ensuring striker's leave:
1. Striker might be blocked by wall and stuck. Although, it can be solved by making striker ignores walls, it is best to avoid spawning them toward walls.
2. Striker might be blocked by obstacles. The obstacles HP could be set low to help them charging though but it's best to avoide spawning them toward obstacles. OTOH some obstacles such as gate shouldn't be destroyed by them.
3. Strikers which can be grabbed can be done, just don't use 'cantgrab'. However, by allowing these, their position might change cause players could move them (with grabmove or throw) and let them go. They might bump to walls or obstacles later.
4. Strikers with higher HP is possible but make sure they have leave screen animation. This could be set in RISE or just ATTACK animation with wide range like above.
This tutorial desribes how to make such striker. However, since striker is not 100% stable, this tutorial will only desribe simple striker which is stable enough.The instability issues will be explained in detail in Issue below.
One thing to mention is that strikers are optional enemies. Players could kill them or just let them go. When they are let go, 'offscreenkill' command will remove them when they are offscreen far enough. That's why you have to make sure to use latest OpenBoR version cause that command is not supported in old version.
Procedure: As mentioned before, striker comes, attack then leaves so that means the striker needs SPAWN animation for the coming in animation. For the attack animation, it can be added after the coming animation in SPAWN or in seperate ATTACK animation. Here's an example for the latter:
name FlyOctiS
health 1
nomove 1 1
type enemy
death 1
cantgrab 1
candamage player obstacle
offscreenkill 100
anim spawn
delay 10
offset 44 90
jumpframe 1 0 1 0
frame data/chars/enemy/idle1.png
frame data/chars/enemy/idle2.png
bbox 12 18 68 63
frame data/chars/enemy/idle3.png
frame data/chars/enemy/idle1.png
frame data/chars/enemy/idle2.png
frame data/chars/enemy/idle3.png
frame data/chars/enemy/idle1.png
frame data/chars/enemy/idle2.png
frame data/chars/enemy/idle3.png
frame data/chars/enemy/idle1.png
frame data/chars/enemy/idle2.png
anim idle
loop 1
delay 10
offset 44 90
bbox 12 18 68 63
frame data/chars/enemy/idle1.png
frame data/chars/enemy/idle2.png
frame data/chars/enemy/idle3.png
anim attack1
loop 1
range 0 400
rangez -200 200
delay 20
offset 44 90
jumpframe 0 0 2 0
bbox 12 18 68 63
attack 41 17 44 67 10 1
frame data/chars/enemy/attack.png
anim death
delay 200
offset 44 90
jumpframe 0 3 -2 0
landframe 1
frame data/chars/enemy/fall1.png
delay 100
frame data/chars/enemy/dead.png
This striker is simple cause it only has 1 HP which means it will die if hit by any attack. It will also play DEATH when killed because of 'death 1'. Animations such as PAIN, FALL and RISE aren't required.
'cantgrab 1' is set to prevent players from grabbing this enemy.
'nomove 1 1' is set to make striker just perform the attack and won't try to walk at all.
'candamage' is set to player and obstacle. The former is obvious, the latter is so striker will also destroy obstacles if it meets any.
'offscreenkill' is important. It is required to make the striker disappear after going offscreen. 100 is chosen so striker will immediately disappear when it is 100 pixels offscreen, left or right. That also means this striker should be spawned less than 100 pixels offscreen to avoid being removed right after being spawned.
About the animations, SPAWN animation holds animation when striker comes. It will stop after animation ends. Then it has ATTACK1 which has wide and long coverage. The idea is so striker always find player and attack after coming in. Well, if there are no player, it will just stay still but it's good thing cause there's no need to attack when there's nothing to hit right? .
In ATTACK1, there's 'jumpframe' which moves striker forward. The animation is looped also which make striker moves continuously to other screen edge. After it goes beyond offscreenkill value, it will disappear.
Here's an example to spawn striker:
spawn flyoctiS
map 2
coords 370 190
at 100spawn flyoctiS
map 2
flip 1
coords -50 210
at 100
Notice that both striker are spawned 50 pixels offscreen. Don't forget to set 'flip' properly so they enter the screen instead of going out.
That's one way to make simple striker. Striker can do anything after coming but make sure it goes offscreen cause players can't be forced to kill striker.
Expansion: There are lots of way to expand the striker but you might need to use script to perfecten the striker. These are couple possible expansions:
1. Instead of charging forward, the striker could shoot or toss projectile in ATTACK1. After shooting or tossing, it could move away offscreen to leave. Combine 'loop' with 'jumpframe' for the leaving effect.
2. Strikers could act just as item carriers. They don't need to have attackbox (nothing wrong if they have though).
3. Strikers could be living time bomb. These type don't need offscreenkill but lifespan instead. Add explosion in DEATH animation and they are set!
4. Alternate ATTACK animation could be added to give alternate attack for the striker making it less predictable.
Aside of using ATTACK animation, striker could just use SPAWN animation for the come, attack then leave actions.
If you want to make striker which leaves from where it comes, you might need script to make sure they go to the right way after attacking. FYI enemy automatically turns if player is behind him/her that's why script is required.
Issue: The simple striker above is actually not 100% stable.
Here are couple instability issues, most of them are about ensuring striker's leave:
1. Striker might be blocked by wall and stuck. Although, it can be solved by making striker ignores walls, it is best to avoid spawning them toward walls.
2. Striker might be blocked by obstacles. The obstacles HP could be set low to help them charging though but it's best to avoide spawning them toward obstacles. OTOH some obstacles such as gate shouldn't be destroyed by them.
3. Strikers which can be grabbed can be done, just don't use 'cantgrab'. However, by allowing these, their position might change cause players could move them (with grabmove or throw) and let them go. They might bump to walls or obstacles later.
4. Strikers with higher HP is possible but make sure they have leave screen animation. This could be set in RISE or just ATTACK animation with wide range like above.