SnowSultan
Member
Hi. I read somewhere that scripts are necessary to set more than one attack button. Could someone point me to either an example pak or a tutorial that shows how this is done? Thanks in advance.
Is it possible to make a secondary 'basic' attack button (like one for punch and one for kick, each with its own attack chain)?
atchain 1
atchain
atchain {number} {number} {number} {number} {number} ...
Determines the attack chain order for player. The attack chain only starts if the first attack hits though. Also if player takes too long before pressing attack to combo, the attack chain will reset to 1st step.
The maximum length is 5 with 'combostyle 0' or 12 with 'combostyle 1' (see below).
{number} can be anything from 1 to 12. 1 refers to ATTACK1, 2 to ATTACK2 and so on. Note: before using number 5 to 12, set 'maxattacks' to 12 1st. See 'maxattacks' above.
You can repeat the same number if you need to.
You don't have to use all of them. Setting something like 'atchain 1 3 2' works.
Default combo is 'atchain 1 1 2 3'.
With 'combostyle 1', various attack chain can be set with this command. For instance, 'atchain 1 2 5 0 3 3 6 0 4 0' have 3 kinds of attack chain in it.
The attack chains are selected by 'range' specified in respective attack (excluding ATTACK1). In above example, if ATTACK2 can't reach target, attack chain will switch to ATTACK3. If the latter hits, the attack chain becomes '1 3 3 6'. If the latter misses, attack chain will switch to ATTACK4.
In any attack chain, if it goes to 0, the attack chain will reset to 1st step (ATTACK1).
Basic
Atchain controls the basic attack chain sequence for all entities, and is optional. {number} corresponds to the attack of the same number, and will alter the sequence of basic attacks performed by an entity. For example, “atchain 1 2 2 3 4” will cause the entity to perform attack1, attack2 twice, then attack3 and finally attack4. Any sequence length from a single attack all the way up to five can be used, and in any order desired. It is also possible to extend the sequence limit to twelve with the Combostyle command (this also enables advanced use, see below).
Without the atchain command, players use a default sequence of 1 1 2 3, and other types do not perform attack chains at all (they randomly use attack1-4).
Advanced
With the Combostyle enabled, you may enter up to twelve attacks in the sequence. In addition, alternate chains can be enabled based upon range to the target using 0 as a divider. For instance, a sequence of “atchain 1 2 5 0 3 3 6 0 4 0”, can be entered, making effectively a three tier attack chain.
To make use of this, you must first enable Range settings in the various attack animations from 2 up. Once the chain starts, each attack is checked for range to the target. Should the target not be within range, the chain will skip to the next attack in order after 0. This cycle will continue until an attack is found with the valid range, or no attacks remain, in which case the very last attack will be used. So for example in the sequence above, an entity is attacked that falls within range of 1, 2, and 5. In this case, 1, 2, and 5 are used, with the chain ending at 5. If another entity is attacked that is out of range of 2, but close enough for 3, 3, and 6, then the sequence would be 1, 3, 3, 6. Should the target be yet again out of range, then 4 would be used. It should be noted that the chain will still end of no hit at all is made. That is, attacking empty air would not trigger 4 in the sequence.
When used properly, this feature can among other things enable ranged based single attacks identical to the Street Fighter series, or allow alternate attack chains based on proximity such as those found in Golden Axe. Below are some examples of attack chains in professional games. Note that just like in most professional games each attack must still hit successfully in order to perform a chain, with or without atchain enabled.
OpenBOR Default: 1 1 2 3
Guy (Final Fight): 1 1 2 3 4
Haggar (Final Fight): 1 1 2
Linn Kurosawa (AVP): 1 2 3 4 5
Ax Battler (Golden Axe): 1 2 6 0 3 3 4 0 5
Examples
In the excerpt of Ryo's header information, atchain can be seen in basic use. In this case, it serves the dual purpose of utilizing Attack4 and eliminating the default repetition of Attack1 to create a more visually appealing attack chain.
#*****General*****
name Ryo_
type player
bounce 2
health 400
speed 9
Throwdamage 26
throwframewait 1
holdblock 1
#fmap 3
hmap 1 5
nodieblink 2
falldie 1
diesound data/sounds/voic120.wav
risetime 50
atchain 1 2 3 4
running 15 5 2 1 1
turndelay 168
gfxshadow 1
#alpha 0
blockpain 1
combostyle
combostyle {bi}
Changes how 'atchain' works.
0 = (Default), old attack chain system. Max attacks is 5.
1 = new attack chain system. Max attacks is 12.
With 'combostyle 1', various attack chain can be set with this command. For instance, 'atchain 1 2 5 0 3 3 6 0 4 0' have 3 kinds of attack chain in it.
The attack chains are selected by 'range' specified in respective attack (excluding ATTACK1). In above example, if ATTACK2 can't reach target, attack chain will switch to ATTACK3. If the latter hits, the attack chain becomes '1 3 3 6'. If the latter misses, attack chain will switch to ATTACK4.
z 160 240 160
z {zmin} {zmax} {bgheight} #zmin - z minimum; zmax - z maximum; bgheight - background height
jumpmove
jumpmove {fx} {fz}
This allows Player to modify player's jump movement.
{fx} determines effect in x axis:
0 = (default) No effect.
1 = Left/Right changes facing direction during jump.
2 = Left/Right changes jumping speed during jump (doesn't work with static jump).
3 = Combination of 1 and 2.
{fz} determines effect in z axis:
0 = (default) No effect.
1 = Walking/running momentum is carried during jump.
2 = Up/Down changes jumping speed during jump (doesn't work with static jump).
3 = Combination of 1 and 2.
jumpheight
jumpheight {int}
{int} is an integer value which determines how high an entity jumps.
The default value is 4.
An entity's jumpheight also affects how far it flys when knocked down, and how high and far jumpframe moves you.
For Bomb entities, this controls how high the bomb arcs into the air.
@script
void main()
{
changeopenborvariant("ypos", 700);
}
@end_script
spawn empty
@script
void main()
{
changeopenborvariant("ypos", 700);
}
@end_script
coords 320 170
at 0
name Empty
type obstacle
shadow 0
offscreenkill 12000
subject_to_gravity 0
anim idle
delay 100
offset 1 1
frame data/chars/misc/empty.gif
anim fall
delay 100
offset 1 1
frame data/chars/misc/empty.gif
could you clarify exactly where that top example is placed?
I think you define a new attack button and then make it a freespecial, and then use cancels and follow anims
but how does this string chains together and combos ?
anim freespecial2
delay 8
offset 170 302
bbox 129 60 88 244
cancel 5 5 0 A2 freespecial4
sound data/chars/kenshiro/ah.wav
frame data/chars/kenshiro/lkick1.png
bbox 76 65 105 239
frame data/chars/kenshiro/lkick2.png
frame data/chars/kenshiro/lkick3.png
attack 176 174 110 85 10 0 0 0 10
frame data/chars/kenshiro/lkick4.png
attack 0
frame data/chars/kenshiro/lkick5.png
frame data/chars/kenshiro/lkick5.png
anim freespecial4
delay 10
offset 170 302
bbox 80 55 97 250
cancel 4 4 0 A2 freespecial5
sound data/chars/kenshiro/ah.wav
frame data/chars/kenshiro/hkick1.png
bbox 45 78 100 226
frame data/chars/kenshiro/hkick2.png
attack4 143 80 156 51 10 0 0 0 10
frame data/chars/kenshiro/hkick3.png
attack 0
bbox 80 55 97 250
frame data/chars/kenshiro/hkick4.png
frame data/chars/kenshiro/hkick4.png
anim freespecial5
delay 7
offset 170 302
bbox 169 82 76 222
sound data/chars/kenshiro/ah.wav
frame data/chars/kenshiro/rkick1.png
bbox 114 66 127 240
frame data/chars/kenshiro/rkick2.png
attack2 240 49 124 114 20 1 0 0 20
dropv 4 4 0
frame data/chars/kenshiro/rkick3.png
attack 0
frame data/chars/kenshiro/rkick4.png
frame data/chars/kenshiro/rkick5.png
frame data/chars/kenshiro/rkick6.png
bbox 84 75 118 230
frame data/chars/kenshiro/rkick7.png
frame data/chars/kenshiro/rkick8.png
frame data/chars/kenshiro/rkick9.png
frame data/chars/kenshiro/rkick10.png