Welcome to the forum.
I'm not sure if I understand your question right as it's a little bit vague for me.
You simply use
com
in the player-type character's header in its file for commands. For example, you give its command to Ryu's Hado(u)ken with
com d f a freespecial
. He'd perform this command with Down, Forward, Attack1.
You don't use
com
in models.txt at all. Only in character text file instead. You put maxfreespecials in models.txt for increasing the number of its limit. I mean you can put how many freespecials you want for your character to have. It can be higher than the default value in the example. That way, if you want to have more than 10 freespecial animations, you can have those as command moves. Not only that, but you can also do cancels.
Example from models.txt:
Code:
maxfreespecials 99 #Maximum number of available freespecials #maxfreespecials {max} (default: 8)
maxfollows 99 #Maximum number of available follows #maxfollows {max} (default: 4)
maxattacks 99 #Maximum number of normal attacks (attack#) #maxattacks {max} (default: 4)
maxattacktypes 99 #Maximum number of attack/pain/fall/death types #maxattacktypes {max} (default: 10)
colourselect 1
ajspecial 1 #Input mapping for special attacks and blocking
nocost 1 #Energy cost behavior for Special (loss of mp or health). See energycost for details.
nolost 1
nodropen #Enemy falling behavior on respawn. No argument. By default, all enemies onscreen are knocked down (no damage) when a player respawns. Simply declaring nodropen will leave enemies standing on player respawn instead.
# Required objects. These must always be loaded.
load Flash data/chars/misc/flash.txt
load SpecFlash data/chars/misc/flash/M_flash/specflash.txt
####### DUSTS ###############################################
load Dust data/chars/misc/dust/fall/dust.txt
load DustL data/chars/misc/dust/land/dustL.txt
load DustJ data/chars/misc/dust/jump/dustJ.txt
#############################################################
Load Hadohit Data/CHARS/misc/Hadoken/Hadohit.txt
Load Hadohit2 Data/CHARS/misc/Hadoken/Hadohit2.txt
Load Hadohit3 Data/CHARS/misc/Hadoken/Hadohit3.txt
# Players must also be loaded.
load Ryu data/chars/Ryu/Ryu.txt
load Ken data/chars/ken/ken.txt
load Chun-Li data/chars/Chun-Li/Chun-Li.txt
Character text file:
Code:
name Ryu #Name of model
type player # entity type
health 100 #150 # how much health the entity has
gfxshadow 1
speed 14 #speed {int}
load hadoken
load Ryu_continue
falldie 2
turndelay 9999999999999999999999999999999 # Over 9 nonillion centiseconds for turndelay as limit before turning face. 100 centiseconds per second
nolife 1
nodieblink 2
#mp 70
atchain 1 #light punch #atchain {attack} {attack} ....
com a2 freespecial #medium punch #com {dir}... (up to 15 dir) {freespecial}
com a3 freespecial2 #heavy punch
com j freespecial3 #light kick
com s freespecial4 #medium kick
com a4 freespecial5 #high kick
icon data/profiles/ryu.png 1
icondie data/profiles/ryu.png 1
Code:
anim freespecial #Medium punch
delay 6
bbox 22 1 43 98
offset 23 99
@cmd makeOpponentBlock
@cmd keyint2 "ANI_ATTACK2" 0 "F" 0
@cmd attack1 0 66 0 "ANI_ATTACK5"
sound data/sounds/common/punch1.wav
hitfx data/sounds/common/beat2.wav
frame data/chars/ryu/171.gif
attack2 49 10 50 23 8 0 0 0 0 0
@cmd makeOpponentBlock
offset 21 99
frame data/chars/ryu/172.gif
offset 20 99
@cmd makeOpponentBlock
frame data/chars/ryu/173.gif
offset 21 99
attack2 0 0 0 0 0 0 0 0 0 0
@cmd makeOpponentUnblock
frame data/chars/ryu/174.gif
offset 22 99
frame data/chars/ryu/175.gif
bbox 13 1 43 98
offset 24 99
frame data/chars/ryu/176.gif
bbox 9 1 43 98
offset 25 99
# @cmd makeOpponentUnblock
frame data/chars/ryu/177.gif
anim freespecial2 #High punch
@cmd makeOpponentBlock
@cmd keyint2 "ANI_ATTACK3" 0 "F" 0
@cmd attack1 0 50 0 "ANI_ATTACK6"
#range 0 45
bbox 7 0 58 102
offset 26 99
delay 5
sound data/sounds/common/punch2.wav
hitfx data/sounds/common/beat3.wav
frame data/chars/ryu/188.gif
@cmd makeOpponentBlock
offset 22 98
frame data/chars/ryu/189.gif
offset 22 93
@cmd makeOpponentBlock
frame data/chars/ryu/190.gif
attack6 53 8 55 30 12 0 0 0 0 0
offset 16 93
@cmd makeOpponentBlock
frame data/chars/ryu/191.gif
attack6 0 0 0 0 0 0 0 0 0 0
frame data/chars/ryu/192.gif
frame data/chars/ryu/193.gif
delay 7
offset 19 96
frame data/chars/ryu/194.gif
offset 21 99
frame data/chars/ryu/195.gif
bbox 7 0 47 103
offset 24 99
@cmd makeOpponentUnblock
frame data/chars/ryu/196.gif
Cancelling:
Code:
anim attack2
delay 3
offset 136 199
bbox 114 96 50 104
cancel 4 5 1 a2 freespecial11 #L L H
frame data/chars/heroes/Clark/46384.png
frame data/chars/heroes/Clark/46390.png
attack 158 104 44 21 9 0 0 0 0 0
frame data/chars/heroes/Clark/46396.png
frame data/chars/heroes/Clark/46402.png
attack 0
frame data/chars/heroes/Clark/46408.png
frame data/chars/heroes/Clark/46414.png
anim attack3
offset 136 199
delay 7
bbox 107 94 47 105
cancel 3 4 1 a2 freespecial10 #L L L H
frame data/chars/heroes/Clark/46558.png
attack 135 125 60 30 10
frame data/chars/heroes/Clark/46564.png
frame data/chars/heroes/Clark/46564.png
attack 0
frame data/chars/heroes/Clark/46570.png
frame data/chars/heroes/Clark/46696.png
anim freespecial10 #L L L H
offset 148 197
delay 8
bbox 125 90 50 107
frame data/chars/heroes/Clark/6606.png
move 5
#offset 143 197
frame data/chars/heroes/Clark/6612.png
move 8
#offset 135 197
frame data/chars/heroes/Clark/6618.png
#offset 127 197
bbox 112 90 50 107
frame data/chars/heroes/Clark/6624.png
move 0
bbox 106 111 54 87
attack 150 124 67 26 13 1
frame data/chars/heroes/Clark/6630.png
frame data/chars/heroes/Clark/6636.png
frame data/chars/heroes/Clark/6630.png
attack 0
bbox 112 90 50 107
frame data/chars/heroes/Clark/6624.png
move -8
bbox 125 90 50 107
frame data/chars/heroes/Clark/6618.png
move -5
frame data/chars/heroes/Clark/6612.png
move 0
frame data/chars/heroes/Clark/6606.png
anim freespecial11 #L L H
offset 145 199
bbox 133 99 50 101
delay 9
cancel 6 7 1 a freespecial12 #L L H L
cancel 6 7 1 a2 freespecial13 #L L H H
frame data/chars/heroes/Clark/46702.png
frame data/chars/heroes/Clark/46708.png
attack 161 116 72 30 10
frame data/chars/heroes/Clark/46714.png
frame data/chars/heroes/Clark/46720.png
attack 0
frame data/chars/heroes/Clark/46726.png
frame data/chars/heroes/Clark/46732.png
offset 140 199
bbox 121 99 50 101
frame data/chars/heroes/Clark/46738.png
frame data/chars/heroes/Clark/46738.png
Code:
anim duck #Stand-to-crouch
@script
void self = getlocalvar("self");
void Fighter1 = getglobalvar("Fighter1");
void Fighter2 = getglobalvar("Fighter2");
void Fighter; float Fx; float x; int Dir;
if(Fighter1 && Fighter2){
if(Fighter1 == self){
Fighter = Fighter2;
} else {
Fighter = Fighter1;
}
Fx = getentityproperty(Fighter, "x");
x = getentityproperty(self, "x");
Dir = getentityproperty(self, "direction");
if(Fx >= x){
if(Dir == 0){
performattack(self, openborconstant("ANI_FOLLOW7")); //Crouch turning
}
} else {
if(Dir == 1){
performattack(self, openborconstant("ANI_FOLLOW7")); //Crouch turning
}
}
}
@end_script
loop 1 2
bbox 4 0 46 95
offset 24 91
delay 3
cancel 2 2 0 a freespecial30
cancel 2 2 0 a2 freespecial6
cancel 2 2 0 a3 freespecial7
cancel 2 2 0 j freespecial8
cancel 2 2 0 s freespecial9
cancel 2 2 0 a4 freespecial10
#@cmd targetL2 openborconstant("ANI_FOLLOW7") 3 0 0 1
frame data/chars/ryu/0001000000.gif
bbox 3 1 49 75
offset 22 72
frame data/chars/ryu/0001000001.gif
bbox 3 0 49 73
offset 23 66
delay 3
@cmd keyint2 "ANI_FOLLOW6" 0 "D" 1
@cmd stop
frame data/chars/ryu/0001000002.gif
Also, you cannot declare any animation name with com like this.
It doesn't work like that at all.
You have to use only freespecials for
com
to work.
I don't mean to be harsh, but that's how using com works. Don't get the animation names mixed up for commands.