Post by BeasTie on Dec 16, 2012 22:28:58 GMT -5
Bouncing Rolling Drums by Bloodbane
Intro:
I'm sure all of you are familiar with Rolling Drums. Almost all Capcom brawlers have them although not present in all levels. Making Rolling Drums is quite easy but what I'm explaining here is how to make them bouncing after falling from certain height. FYI subtype arrow which is the type used for making Rolling Drums aren't affected by gravity, that's why they can't fall and thus can't bounce. How to solve that? Read below.
Procedure:
1st of all, here's an example of rolling drum text:
For those who don't know how to make rolling drum, that's how. Quite similar to making obstacles, except that there's attackbox in IDLE animation.
Like I said before, this rolling drum will roll normally except that it can't fall to holes or to be exact it's not affected by gravity. To solve that, add 'no_adjust_base 0' and 'subject_to_hole 1' to the header. The former enables gravity to affect this rolling drum while the latter allows it to fall to holes.
Aside from those, there's another command to add for bounce effect. It's 'bouncefactor' in IDLE animation. This command sets how this drum bounces (read manual for more info).
Here's how the text would be:
I chose 'bouncefactor 2' cause the bounce effect is higher than bigger values. The rolling drum is set.
Wait! There's another thing to set. In order to make this drum bounce, it needs to be spawned with certain height. To do that, give starting altitude in level texts like this:
The 3rd value in 'coords' sets the altitude. When this rolling drum is spawned, it will fall from that height and bounce when it hits ground.
You can set any height value you want but remember, higher value gives higher bounce.
Limitation:
Maybe some of you wonder, is there any SFX played when the drum bounce? the answer is yes. The SFX is fall.wav, same SFX you hear when any entity falls to ground.
AFAIK there's no way to change this SFX just for this drum so metal drum would sound like fallen box when it bounces. You can't put the SFX in IDLE since we can't tell at which frame drum will land.
The only possible solution to this is script, update script to be exact.
Intro:
I'm sure all of you are familiar with Rolling Drums. Almost all Capcom brawlers have them although not present in all levels. Making Rolling Drums is quite easy but what I'm explaining here is how to make them bouncing after falling from certain height. FYI subtype arrow which is the type used for making Rolling Drums aren't affected by gravity, that's why they can't fall and thus can't bounce. How to solve that? Read below.
Procedure:
1st of all, here's an example of rolling drum text:
name RollDrum
health 5
speed 9
type enemy
subtype arrow
shadow 0
icon data/chars/misc/drumicon.gif
diesound data/sounds/klunk.wav
noquake 1
candamage player enemy obstacle
anim idle
loop 1
delay 10
offset 42 52
bbox 2 -20 77 79
attack 2 0 77 59 10 1
frame data/chars/misc/rldrum01.gif
frame data/chars/misc/rldrum02.gif
attack 0
frame data/chars/misc/rldrum03.gif
frame data/chars/misc/rldrum04.gif
anim fall
delay 25
offset 28 82
frame data/chars/misc/bdrum01.gif
frame data/chars/misc/bdrum02.gif
For those who don't know how to make rolling drum, that's how. Quite similar to making obstacles, except that there's attackbox in IDLE animation.
Like I said before, this rolling drum will roll normally except that it can't fall to holes or to be exact it's not affected by gravity. To solve that, add 'no_adjust_base 0' and 'subject_to_hole 1' to the header. The former enables gravity to affect this rolling drum while the latter allows it to fall to holes.
Aside from those, there's another command to add for bounce effect. It's 'bouncefactor' in IDLE animation. This command sets how this drum bounces (read manual for more info).
Here's how the text would be:
name RollDrum
health 5
speed 9
type enemy
subtype arrow
shadow 0
icon data/chars/misc/drumicon.gif
diesound data/sounds/klunk.wav
noquake 1
candamage player enemy obstacle
subject_to_hole 1
no_adjust_base 0
anim idle
loop 1
delay 10
offset 42 52
bouncefactor 2
bbox 2 -20 77 79
attack 2 0 77 59 10 1
frame data/chars/misc/rldrum01.gif
frame data/chars/misc/rldrum02.gif
attack 0
frame data/chars/misc/rldrum03.gif
frame data/chars/misc/rldrum04.gif
anim fall
delay 25
offset 28 82
frame data/chars/misc/bdrum01.gif
frame data/chars/misc/bdrum02.gif
I chose 'bouncefactor 2' cause the bounce effect is higher than bigger values. The rolling drum is set.
Wait! There's another thing to set. In order to make this drum bounce, it needs to be spawned with certain height. To do that, give starting altitude in level texts like this:
spawn Rolldrum
alias Drum
flip 1
coords -200 195 100
at 400
spawn Rolldrum
alias Drum
flip 1
coords -200 165 200
at 450
spawn Rolldrum
alias Drum
flip 1
coords -200 225 300
at 500
The 3rd value in 'coords' sets the altitude. When this rolling drum is spawned, it will fall from that height and bounce when it hits ground.
You can set any height value you want but remember, higher value gives higher bounce.
Limitation:
Maybe some of you wonder, is there any SFX played when the drum bounce? the answer is yes. The SFX is fall.wav, same SFX you hear when any entity falls to ground.
AFAIK there's no way to change this SFX just for this drum so metal drum would sound like fallen box when it bounces. You can't put the SFX in IDLE since we can't tell at which frame drum will land.
The only possible solution to this is script, update script to be exact.