Remade char asks for script and I don't know how to do it

Side21

Member
I'm creating a char straight from sor2 and changed his name, installed it as always says that there must be a script, but I don't know how to do it, can you help me friends?

This is the script I don't know how to configure, to activate the char called haratsu:

####animationscript function main#####
# data/chars/haratsu/haratsu.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==174)
    {
        if(frame==8)
        {
            tele();
        }
        return;
    }
    if(animhandle==177)
    {
        if(frame==0)
        {
            antiThrow();
        }
        return;
    }

}


the char haratsu:

name Haratsu

gfxshadow 1
health 70
speed 13
type enemy
aggression -60
shadow 4
hostile player npc
projectilehit obstacle enemy npc
candamage obstacle player npc
dust dust
icon data/chars/haratsu/icon.gif
diesound data/sounds/die1.wav
atchain    1 1 2 3 0


remap data/chars/haratsu/walk1.gif data/chars/haratsu/map1.gif
remap data/chars/haratsu/walk1.gif data/chars/haratsu/map2.gif
remap data/chars/haratsu/walk1.gif data/chars/haratsu/map3.gif
remap data/chars/haratsu/walk1.gif data/chars/haratsu/map4.gif
remap data/chars/haratsu/walk1.gif data/chars/haratsu/map5.gif
remap data/chars/haratsu/walk1.gif data/chars/haratsu/map6.gif
remap data/chars/haratsu/walk1.gif data/chars/haratsu/map7.gif




anim attack1
range 20 60
loop 0
delay 15
offset 38 75
bbox 29 10 33 65
attack 61 8 33 26 10
frame data/chars/haratsu/punch1.gif

anim attack2
hitflash fqblood
hitfx data/sounds/slash.wav
range 20 80
loop 0
delay 15
move 2
offset 38 75
bbox 33 8 25 65
frame data/chars/haratsu/punch2.gif
move 0
delay 10
attack 61 8 33 22 15 0 1 0 40
frame data/chars/haratsu/punch3.gif
attack 0
offset 42 75
bbox 29 10 33 65
frame data/chars/haratsu/punch4.gif

anim attack3
range 150 300
rangez -100 100
offset 30 80
delay 5
frame data/chars/haratsu/walk1.gif
frame data/chars/misc/empty.gif
frame data/chars/haratsu/walk1.gif
frame data/chars/misc/empty.gif
frame data/chars/haratsu/walk1.gif
frame data/chars/misc/empty.gif
frame data/chars/haratsu/walk1.gif
frame data/chars/misc/empty.gif
@cmd tele
frame data/chars/misc/empty.gif
frame data/chars/haratsu/walk1.gif
frame data/chars/misc/empty.gif
frame data/chars/haratsu/walk1.gif
frame data/chars/misc/empty.gif
frame data/chars/haratsu/walk1.gif
frame data/chars/misc/empty.gif
frame data/chars/haratsu/walk1.gif

anim fall
delay 40
offset 59 68
bbox 32 2 39 61
attack 32 2 39 61 8 1 1 0 40
frame data/chars/haratsu/fall1.gif
attack 0
offset 42 80
delay 30
frame data/chars/haratsu/fall2.gif

anim fall2
delay 40
offset 59 68
bbox 32 2 39 61
frame data/chars/haratsu/fall1.gif
bbox 0
offset 42 80
delay 30
frame data/chars/haratsu/fall2.gif

anim fall4
@cmd antiThrow
Delay 50
OffSet 32 59
Attack 14 25 29 46 10 1 1 0 40
OffSet 42 80
Attack 0
frame data/chars/haratsu/fallr2.gif
frame data/chars/haratsu/fall2.gif

anim fall7
Delay 3000
OffSet 20 80
frame data/chars/haratsu/fallt.gif
frame data/chars/haratsu/fmap.gif
frame data/chars/haratsu/fall2.gif
frame data/chars/haratsu/fallr1.gif
frame data/chars/haratsu/fallr2.gif

anim get
delay 10
offset 32 104
frame data/chars/haratsu/jump1.gif

anim grabbed
offset 20 80
bbox 12 13 32 66
delay 3
frame data/chars/haratsu/pain.gif

anim idle
loop 1
offset 30 80
bbox 15 12 32 66
delay 12
frame data/chars/haratsu/walk1.gif
frame data/chars/haratsu/idle.gif

anim jumpattack
range 10 200
delay 35
offset 32 104
throwframe 2
bbox 22 40 25 54
frame data/chars/haratsu/jump2.gif
delay 12
bbox 22 8 25 54
frame data/chars/haratsu/dart00.gif
frame data/chars/haratsu/dart01.gif
delay 7
bbox 22 40 25 54
frame data/chars/haratsu/jump2.gif
delay 50
bbox 10 61 39 45
frame data/chars/haratsu/jump1.gif

anim jumpland
delay 30
offset 32 104
frame data/chars/haratsu/jump1.gif

anim land
delay 10
offset 32 104
frame data/chars/haratsu/jump1.gif

anim pain
loop 0
offset 20 80
bbox 12 13 32 66
delay 5
move -1
frame data/chars/haratsu/pain.gif
move 1
frame data/chars/haratsu/pain.gif
move -1
frame data/chars/haratsu/pain.gif
move 1
frame data/chars/haratsu/pain.gif
move -1
frame data/chars/haratsu/pain.gif
move 1
frame data/chars/haratsu/pain.gif
move -1
frame data/chars/haratsu/pain.gif

anim pain2
offset 20 80
bbox 12 13 32 66
delay 8
move -1
frame data/chars/haratsu/fmap.gif
move 1
frame data/chars/haratsu/fmap.gif
move -1
frame data/chars/haratsu/fmap.gif
move 1
frame data/chars/haratsu/fmap.gif
move -1
frame data/chars/haratsu/fmap.gif
move 1
frame data/chars/haratsu/fmap.gif

anim pain4
loop 0
offset 20 80
bbox 12 13 32 66
delay 5
move -3
frame data/chars/haratsu/pain.gif
frame data/chars/haratsu/pain.gif
frame data/chars/haratsu/pain.gif
frame data/chars/haratsu/pain.gif

anim pain7
loop 0
offset 20 80
bbox 12 13 32 66
delay 300
frame data/chars/haratsu/fmap.gif

anim rise
offset 30 80
delay 40
frame data/chars/haratsu/rise.gif

anim throw
offset 30 80
delay 10
frame data/chars/haratsu/throw1.gif
sound data/chars/haratsu/hyy.wav
frame data/chars/haratsu/throw2.gif
delay 15
frame data/chars/haratsu/throw3.gif

anim walk
loop 1
offset 30 80
bbox 15 12 32 66
delay 20
frame data/chars/haratsu/walk1.gif
frame data/chars/haratsu/walk2.gif
frame data/chars/haratsu/walk3.gif
frame data/chars/haratsu/walk4.gif

#|edited by openBor Stats v 0.67



haratsu2 txt file
when to get weapons:


name haratsu2

gfxshadow 1
type none
grabdistance 19
modelflag 1

remap data/chars/haratsu/walk1.gif data/chars/haratsu/map1.gif
remap data/chars/haratsu/walk1.gif data/chars/haratsu/map2.gif
remap data/chars/haratsu/walk1.gif data/chars/haratsu/map3.gif
remap data/chars/haratsu/walk1.gif data/chars/haratsu/map4.gif
remap data/chars/haratsu/walk1.gif data/chars/haratsu/map5.gif
remap data/chars/haratsu/walk1.gif data/chars/haratsu/map6.gif
remap data/chars/haratsu/walk1.gif data/chars/haratsu/map7.gif


anim idle
loop 1
offset 27 92
bbox 13 30 30 65
delay 13
frame data/chars/haratsu/xidle1.gif
frame data/chars/haratsu/xidle2.gif
frame data/chars/haratsu/xidle3.gif
frame data/chars/haratsu/xidle2.gif

anim walk
loop 1
offset 27 84
bbox 14 21 31 67
delay 17
frame data/chars/haratsu/xwalk1.gif
frame data/chars/haratsu/xwalk2.gif
frame data/chars/haratsu/xwalk3.gif
frame data/chars/haratsu/xwalk4.gif

anim attack1
range 10 90
delay 13
offset 38 123
bbox 26 61 28 65
hitflash fqblood
hitfx data/sounds/slash.wav
sound data/sounds/sword.wav
frame data/chars/haratsu/sat1.gif
delay 11
attack 74 79 56 7 15 1 1 0 40
frame data/chars/haratsu/sat2.gif
attack 0
bbox 26 61 28 65
delay 17
frame data/chars/haratsu/sat3.gif

anim jumpattack

anim attack3

anim attack2
jumpframe 0 4 2
range 0 120
delay 8
hitflash  fqBlood
hitfx  data/sounds/knife.wav

offset 40 62
bbox 19 18 43 44
sound data/chars/haratsu/ngs.wav
attack 56 12 25 22 20 1 1 0 40
  frame data/chars/haratsu/jst1.gif
attack 47 52 23 26 20 1 1 0 40
frame data/chars/haratsu/jst2.gif
attack 2 46 25 24 20 1 1 0 40
frame data/chars/haratsu/jst3.gif
attack 11 2 23 24 20 1 1 0 40
frame data/chars/haratsu/jst4.gif
attack 56 12 25 22 20 1 1 0 40
  frame data/chars/haratsu/jst1.gif
attack 47 52 23 26 20 1 1 0 40
frame data/chars/haratsu/jst2.gif
attack 2 46 25 24 20 1 1 0 40
frame data/chars/haratsu/jst3.gif
attack 11 2 23 24 20 1 1 0 40
frame data/chars/haratsu/jst4.gif
attack 56 12 25 22 20 1 1 0 40
  frame data/chars/haratsu/jst1.gif
attack 47 52 23 26 20 1 1 0 40
frame data/chars/haratsu/jst2.gif







log: Can't compile script 'Haratsu' data/chars/haratsu/haratsu.txt

####animationscript function main#####
# data/chars/haratsu/haratsu.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animhandle = getlocalvar("animhandle");
    if(animhandle==174)
    {
        if(frame==8)
        {
            tele();
        }
        return;
    }
    if(animhandle==177)
    {
        if(frame==0)
        {
            antiThrow();
        }
        return;
    }

}






 
I can see these @cmd
...
frame  data/chars/haratsu/walk1.gif
  frame  data/chars/misc/empty.gif
  @cmd  tele
  frame  data/chars/misc/empty.gif
  frame  data/chars/haratsu/walk1.gif
...

anim  fall4
  @cmd  antiThrow
  Delay  50
  OffSet  32 59
  Attack  14 25 29 46 10 1 1 0 40
  OffSet  42 80
  Attack  0
  frame  data/chars/haratsu/fallr2.gif

but I don't see animationscript which holds these functions

You need to reread the character from SoR2 mod and find line starting with "animationscript". Copy the whole line to Haratsu.txt

HTH
 
Just like bloodbane said find the animation script file that has the functions they may start with these lines:

void antiThrow()
void tele()

Then link them to your character using:

Animationscript data/scripts/the_file.c

Obviously replace "the_file.c" with the file you found the functions in.
 
msmalik681 said:
Just like bloodbane said find the animation script file that has the functions they may start with these lines:

void antiThrow()
void tele()

Then link them to your character using:

Animationscript data/scripts/the_file.c


Esse é o arquivo scropt original do sor2x:

name Ninja
gfxshadow 1
health 70
speed 13
type enemy
aggression -60
shadow 4
hostile player npc
projectilehit obstacle enemy npc
candamage obstacle player npc
dust dust
icon data/chars/ninja/icon.gif
diesound data/sounds/die1.wav
grabdistance 20
score 1000 8
animationscript data/scripts/ninja.c
onspawnscript data/scripts/spawn/enemy.c
weapons none none none Xninja Ninja

load Star
load XNinja



In fact, I wanted to remove this script that is hidden in it, I don’t know where, in other sors I managed to create a char without it and got more with this, there’s no way, I can’t do as you say



Obviously replace "the_file.c" with the file you found the functions in.
 
If you don't want to use script, you could remove all lines with @cmd . However you will have to replace the mechanic which requires those scripts. Or worse, you will have to remove the whole mechanic
Are you sure you want to do this?

If you are, I suggest removing ATTACK3 animation from Haratsu and remove @cmd antiThrow from his FALL4 animation

HTH
 
Back
Top Bottom