About Shadow Script

xyz555

Member
About Shadow Script

This shadow script works pretty well
but it has a missing
It is impossible to put the target, including the shadow
Please, seniors, can this script be improved?
should be like this
void target = getentityproperty(self, "opponent");
Put the target, including the shadow appearing
thank you all
:傻笑:

11111111111111111111111111111111111111.gif
 

Attachments

@xyz555, please post the script into code tags as explained here. Posting as an attachment adds extra steps for us and isn't feasible at all to read when we're on a phone.

DC
 
@xyz555, please post the script into code tags as explained here. Posting as an attachment adds extra steps for us and isn't feasible at all to read when we're on a phone.

DC

Thank you very much for your reply, now I will post the script directly, hoping to help realize the effect of my dream, thank you very much :giggle: :giggle: :giggle:

void main()
{
int i, j;
void spr;
int facing;
float y, z, x;
void self = getlocalvar("self"); //get caller
int ani = getentityproperty(self, "animationid"); //current animation id
int time = openborvariant("elapsed_time"); //current time in game
int timer = getlocalvar("shadow."+self+".timer"); //hold a variable for timer
//recover all properties recovered from animation script
int max = getentityvar(self,"shadow.max");
int delay = getentityvar(self,"shadow.delay");
int timeout = getentityvar(self,"shadow.timeout");
int alpha = getentityvar(self,"shadow.alpha");
int tintm = getentityvar(self,"shadow.tintm");
int r = getentityvar(self,"shadow.r");
int g = getentityvar(self,"shadow.g");
int b = getentityvar(self,"shadow.b");
int anim = getentityvar(self,"shadow.anim");
if(timer==NULL()){setlocalvar("shadow."+self+".timer",-1);} //if timer has no value set timer -1
void table = getentityproperty(self, "colourmap");

if(ani==anim && timer<time) //if the animation id from animation script matches current animation id and timer below 0
{
spr = getentityproperty(self, "sprite"); //caller current sprite
x = getentityproperty(self, "x"); //caller x position
z = getentityproperty(self, "z"); //caller z position
y = getentityproperty(self, "y"); //caller y position
facing = !getentityproperty(self, "direction"); //caller facing direction

//settextobj(0,55, 200,3,9999999999,"working");
//drawsprite(spr,openborvariant("xpos")+x,z-y-openborvariant("ypos")-10,z,50);

for(i=1; i<=max; i++) //find an empty shadow slot and store cuurent sprite with other details
{
if(getlocalvar("shadow."+self+"."+i+".s")==NULL())
{
setlocalvar("shadow."+self+"."+i+".s", spr);
setlocalvar("shadow."+self+"."+i+".x", x);
setlocalvar("shadow."+self+"."+i+".z", z);
setlocalvar("shadow."+self+"."+i+".y", y);
setlocalvar("shadow."+self+"."+i+".f", facing);
setlocalvar("shadow."+self+"."+i+".tm", tintm);
setlocalvar("shadow."+self+"."+i+".a", alpha);
setlocalvar("shadow."+self+"."+i+".r", r);
setlocalvar("shadow."+self+"."+i+".g", g);
setlocalvar("shadow."+self+"."+i+".b", b);
setlocalvar("shadow."+self+"."+i+".t", openborvariant("elapsed_time")+timeout);
setlocalvar("shadow."+self+".timer",openborvariant("elapsed_time")+delay); //set a delay before next sprite can be recorded
break; //stop the loop
}
}
}

for(j=1; j<=max; j++)//show any stored shadows or if their time is up remove them
{
if(getlocalvar("shadow."+self+"."+j+".t")!=NULL())
{
if (getlocalvar("shadow."+self+"."+j+".t")<openborvariant("elapsed_time"))
{
setlocalvar("shadow."+self+"."+j+".s", NULL());
setlocalvar("shadow."+self+"."+j+".x", NULL());
setlocalvar("shadow."+self+"."+j+".z", NULL());
setlocalvar("shadow."+self+"."+j+".y", NULL());
setlocalvar("shadow."+self+"."+j+".f", NULL());
setlocalvar("shadow."+self+"."+j+".c", NULL());
setlocalvar("shadow."+self+"."+j+".t", NULL());
setlocalvar("shadow."+self+"."+j+".tm", NULL());
setlocalvar("shadow."+self+"."+j+".a", NULL());
setlocalvar("shadow."+self+"."+j+".r", NULL());
setlocalvar("shadow."+self+"."+j+".g", NULL());
setlocalvar("shadow."+self+"."+j+".b", NULL());
} else {
changedrawmethod(NULL(),"reset",1);
changedrawmethod(NULL(), "table", table);
changedrawmethod(NULL(),"flipx",getlocalvar("shadow."+self+"."+j+".f")); //face same as caller
changedrawmethod(NULL(),"alpha",getlocalvar("shadow."+self+"."+j+".a")); //apply alpha effect
changedrawmethod(NULL(),"tintmode",getlocalvar("shadow."+self+"."+j+".tm")); //apply tint effect
changedrawmethod(NULL(),"tintcolor",rgbcolor(getlocalvar("shadow."+self+"."+j+".r"),getlocalvar("shadow."+self+"."+j+".g"),getlocalvar("shadow."+self+"."+j+".b"))); //set a tint
drawsprite(getlocalvar("shadow."+self+"."+j+".s"),getlocalvar("shadow."+self+"."+j+".x")-openborvariant("xpos"),getlocalvar("shadow."+self+"."+j+".z")-getlocalvar("shadow."+self+"."+j+".y")-openborvariant("ypos")-4,getlocalvar("shadow."+self+"."+j+".z")-j);
changedrawmethod(NULL(),"reset",1);
}
}
}
}
 
Thank you very much for your reply, now I will post the script directly, hoping to help realize the effect of my dream, thank you very much :giggle: :giggle: :giggle:

void main()
{
int i, j;
void spr;
int facing;
float y, z, x;
void self = getlocalvar("self"); //get caller
int ani = getentityproperty(self, "animationid"); //current animation id
int time = openborvariant("elapsed_time"); //current time in game
int timer = getlocalvar("shadow."+self+".timer"); //hold a variable for timer
//recover all properties recovered from animation script
int max = getentityvar(self,"shadow.max");
int delay = getentityvar(self,"shadow.delay");
int timeout = getentityvar(self,"shadow.timeout");
int alpha = getentityvar(self,"shadow.alpha");
int tintm = getentityvar(self,"shadow.tintm");
int r = getentityvar(self,"shadow.r");
int g = getentityvar(self,"shadow.g");
int b = getentityvar(self,"shadow.b");
int anim = getentityvar(self,"shadow.anim");
if(timer==NULL()){setlocalvar("shadow."+self+".timer",-1);} //if timer has no value set timer -1
void table = getentityproperty(self, "colourmap");

if(ani==anim && timer<time) //if the animation id from animation script matches current animation id and timer below 0
{
spr = getentityproperty(self, "sprite"); //caller current sprite
x = getentityproperty(self, "x"); //caller x position
z = getentityproperty(self, "z"); //caller z position
y = getentityproperty(self, "y"); //caller y position
facing = !getentityproperty(self, "direction"); //caller facing direction

//settextobj(0,55, 200,3,9999999999,"working");
//drawsprite(spr,openborvariant("xpos")+x,z-y-openborvariant("ypos")-10,z,50);

for(i=1; i<=max; i++) //find an empty shadow slot and store cuurent sprite with other details
{
if(getlocalvar("shadow."+self+"."+i+".s")==NULL())
{
setlocalvar("shadow."+self+"."+i+".s", spr);
setlocalvar("shadow."+self+"."+i+".x", x);
setlocalvar("shadow."+self+"."+i+".z", z);
setlocalvar("shadow."+self+"."+i+".y", y);
setlocalvar("shadow."+self+"."+i+".f", facing);
setlocalvar("shadow."+self+"."+i+".tm", tintm);
setlocalvar("shadow."+self+"."+i+".a", alpha);
setlocalvar("shadow."+self+"."+i+".r", r);
setlocalvar("shadow."+self+"."+i+".g", g);
setlocalvar("shadow."+self+"."+i+".b", b);
setlocalvar("shadow."+self+"."+i+".t", openborvariant("elapsed_time")+timeout);
setlocalvar("shadow."+self+".timer",openborvariant("elapsed_time")+delay); //set a delay before next sprite can be recorded
break; //stop the loop
}
}
}

for(j=1; j<=max; j++)//show any stored shadows or if their time is up remove them
{
if(getlocalvar("shadow."+self+"."+j+".t")!=NULL())
{
if (getlocalvar("shadow."+self+"."+j+".t")<openborvariant("elapsed_time"))
{
setlocalvar("shadow."+self+"."+j+".s", NULL());
setlocalvar("shadow."+self+"."+j+".x", NULL());
setlocalvar("shadow."+self+"."+j+".z", NULL());
setlocalvar("shadow."+self+"."+j+".y", NULL());
setlocalvar("shadow."+self+"."+j+".f", NULL());
setlocalvar("shadow."+self+"."+j+".c", NULL());
setlocalvar("shadow."+self+"."+j+".t", NULL());
setlocalvar("shadow."+self+"."+j+".tm", NULL());
setlocalvar("shadow."+self+"."+j+".a", NULL());
setlocalvar("shadow."+self+"."+j+".r", NULL());
setlocalvar("shadow."+self+"."+j+".g", NULL());
setlocalvar("shadow."+self+"."+j+".b", NULL());
} else {
changedrawmethod(NULL(),"reset",1);
changedrawmethod(NULL(), "table", table);
changedrawmethod(NULL(),"flipx",getlocalvar("shadow."+self+"."+j+".f")); //face same as caller
changedrawmethod(NULL(),"alpha",getlocalvar("shadow."+self+"."+j+".a")); //apply alpha effect
changedrawmethod(NULL(),"tintmode",getlocalvar("shadow."+self+"."+j+".tm")); //apply tint effect
changedrawmethod(NULL(),"tintcolor",rgbcolor(getlocalvar("shadow."+self+"."+j+".r"),getlocalvar("shadow."+self+"."+j+".g"),getlocalvar("shadow."+self+"."+j+".b"))); //set a tint
drawsprite(getlocalvar("shadow."+self+"."+j+".s"),getlocalvar("shadow."+self+"."+j+".x")-openborvariant("xpos"),getlocalvar("shadow."+self+"."+j+".z")-getlocalvar("shadow."+self+"."+j+".y")-openborvariant("ypos")-4,getlocalvar("shadow."+self+"."+j+".z")-j);
changedrawmethod(NULL(),"reset",1);
}
}
}
}

I think you are misunderstanding me. I need you to use the forum's code block feature. It's very easy and I wrote detailed instructions. If you don't do that, I can't read the code without going through extra steps on my end. Please read this link:

 
This shadow script works pretty well
but it has a missing
It is impossible to put the target, including the shadow
Please, seniors, can this script be improved?
should be like this
void target = getentityproperty(self, "opponent");
Put the target, including the shadow appearing

Let me confirm this: you like the trailing shadow script however it's no complete since it doesn't affect opponent. So you need help improving the script to affect opponent too, right?

Assuming the answer is yes, I'm afraid it would not be simple cause there should be check when that should be applied or I should say, the script should only apply to grabbed (or stabbed in this case) opponent.
 
I think you are misunderstanding me. I need you to use the forum's code block feature. It's very easy and I wrote detailed instructions. If you don't do that, I can't read the code without going through extra steps on my end. Please read this link:

I don't know if I understand correctly
But I have followed what I understand to do
Thank you very much for your reply, I wish you good health and happy work :giggle: :giggle:
 

Code:
void main()
{
    int i, j;
    void spr;
    int facing;
    float y, z, x;
    void self = getlocalvar("self"); //get caller
    int ani = getentityproperty(self, "animationid"); //current animation id
    int time = openborvariant("elapsed_time");    //current time in game
    int timer = getlocalvar("shadow."+self+".timer");    //hold a variable for timer
    //recover all properties recovered from animation script
    int max = getentityvar(self,"shadow.max");
    int delay = getentityvar(self,"shadow.delay");
    int timeout = getentityvar(self,"shadow.timeout");
    int alpha = getentityvar(self,"shadow.alpha");
    int tintm = getentityvar(self,"shadow.tintm");
    int r = getentityvar(self,"shadow.r");
    int g = getentityvar(self,"shadow.g");
    int b = getentityvar(self,"shadow.b");
    int anim = getentityvar(self,"shadow.anim");
    if(timer==NULL()){setlocalvar("shadow."+self+".timer",-1);}    //if timer has no value set timer -1
    void table = getentityproperty(self, "colourmap");

if(ani==anim && timer<time) //if the animation id from animation script matches current animation id and timer below 0
{
    spr = getentityproperty(self, "sprite");        //caller current sprite
    x = getentityproperty(self, "x");            //caller x position
    z = getentityproperty(self, "z");            //caller z position
    y = getentityproperty(self, "y");            //caller y position
    facing = !getentityproperty(self, "direction");        //caller facing direction

//settextobj(0,55, 200,3,9999999999,"working");
//drawsprite(spr,openborvariant("xpos")+x,z-y-openborvariant("ypos")-10,z,50);

    for(i=1; i<=max; i++) //find an empty shadow slot and store cuurent sprite with other details
        {
            if(getlocalvar("shadow."+self+"."+i+".s")==NULL())
             {
                setlocalvar("shadow."+self+"."+i+".s", spr);
                setlocalvar("shadow."+self+"."+i+".x", x);
                setlocalvar("shadow."+self+"."+i+".z", z);
                setlocalvar("shadow."+self+"."+i+".y", y);
                setlocalvar("shadow."+self+"."+i+".f", facing);
                setlocalvar("shadow."+self+"."+i+".tm", tintm);
                setlocalvar("shadow."+self+"."+i+".a", alpha);
                setlocalvar("shadow."+self+"."+i+".r", r);
                setlocalvar("shadow."+self+"."+i+".g", g);
                setlocalvar("shadow."+self+"."+i+".b", b);
                setlocalvar("shadow."+self+"."+i+".t", openborvariant("elapsed_time")+timeout);
                setlocalvar("shadow."+self+".timer",openborvariant("elapsed_time")+delay);    //set a delay before next sprite can be recorded
                break; //stop the loop
             }
        }
}

        for(j=1; j<=max; j++)//show any stored shadows or if their time is up remove them
         {
          if(getlocalvar("shadow."+self+"."+j+".t")!=NULL())
          {
            if (getlocalvar("shadow."+self+"."+j+".t")<openborvariant("elapsed_time"))
            {
            setlocalvar("shadow."+self+"."+j+".s", NULL());
            setlocalvar("shadow."+self+"."+j+".x", NULL());
            setlocalvar("shadow."+self+"."+j+".z", NULL());
            setlocalvar("shadow."+self+"."+j+".y", NULL());
            setlocalvar("shadow."+self+"."+j+".f", NULL());
            setlocalvar("shadow."+self+"."+j+".c", NULL());
            setlocalvar("shadow."+self+"."+j+".t", NULL());
            setlocalvar("shadow."+self+"."+j+".tm", NULL());
            setlocalvar("shadow."+self+"."+j+".a", NULL());
            setlocalvar("shadow."+self+"."+j+".r", NULL());
            setlocalvar("shadow."+self+"."+j+".g", NULL());
            setlocalvar("shadow."+self+"."+j+".b", NULL());
            } else    {
                changedrawmethod(NULL(),"reset",1);
                changedrawmethod(NULL(), "table", table);
                changedrawmethod(NULL(),"flipx",getlocalvar("shadow."+self+"."+j+".f")); //face same as caller
                changedrawmethod(NULL(),"alpha",getlocalvar("shadow."+self+"."+j+".a")); //apply alpha effect
                changedrawmethod(NULL(),"tintmode",getlocalvar("shadow."+self+"."+j+".tm")); //apply tint effect
                changedrawmethod(NULL(),"tintcolor",rgbcolor(getlocalvar("shadow."+self+"."+j+".r"),getlocalvar("shadow."+self+"."+j+".g"),getlocalvar("shadow."+self+"."+j+".b"))); //set a tint
                drawsprite(getlocalvar("shadow."+self+"."+j+".s"),getlocalvar("shadow."+self+"."+j+".x")-openborvariant("xpos"),getlocalvar("shadow."+self+"."+j+".z")-getlocalvar("shadow."+self+"."+j+".y")-openborvariant("ypos")-4,getlocalvar("shadow."+self+"."+j+".z")-j);
                changedrawmethod(NULL(),"reset",1);
                }
          }
         }
}
 
Let me confirm this: you like the trailing shadow script however it's no complete since it doesn't affect opponent. So you need help improving the script to affect opponent too, right?

Assuming the answer is yes, I'm afraid it would not be simple cause there should be check when that should be applied or I should say, the script should only apply to grabbed (or stabbed in this case) opponent.

The imperfection of this shadow script is indeed because he cannot include the shadow of the target opponent at the same time:):):)
 
I don't think it will be difficult to tweak the shadow script to work like this i will make a update as im pretty sure your using the shadow script i posted.
 
I don't think it will be difficult to tweak the shadow script to work like this i will make a update as im pretty sure your using the shadow script i posted.
Thank you very much, your shadow script, the effect is indeed very good, if the shadow can be updated to include the caught, target, opponent, it will be more perfect, thank you for your hard work😃😃😃
 
I don't think it will be difficult to tweak the shadow script to work like this i will make a update as im pretty sure your using the shadow script i posted.
I suddenly remembered a question
If the script can achieve the most grasping of the enemy, the shadow of the target opponent will appear synchronously
So if it is a state of normal attack (without catching the enemy), the script should not make the opponent's shadow appear synchronously

Here are two cases
It seems that it should be more complicated
I wonder if the openbor script can set a parameter to realize this choice?

Thank you and good luck with your work😃😃😃
 
@xyz555

This this just replace both shadow scripts in your project. All enemies that can be slammed need a reference to the ondrawscript like this "ondrawscript data/scripts/shadowon.c" you can also edit the enemies shadow settings in shadowon.c. The player has to set enemies shadows after they grab them with "@cmd enemy_shadow 1" you can also stop with "@cmd enemy_shadow 0" when you are no longer grabbing the enemy the enemy shadows will stop too. Let me know if that works for you.

Download: ShadowTrails2017 v3.1.tar
 
@xyz555

This this just replace both shadow scripts in your project. All enemies that can be slammed need a reference to the ondrawscript like this "ondrawscript data/scripts/shadowon.c" you can also edit the enemies shadow settings in shadowon.c. The player has to set enemies shadows after they grab them with "@cmd enemy_shadow 1" you can also stop with "@cmd enemy_shadow 0" when you are no longer grabbing the enemy the enemy shadows will stop too. Let me know if that works for you.

Download: ShadowTrails2017 v3.1.tar
Sincerely thank you for your help and attention
But this time the script update seems to only include (opponent,"grabbing")

But can he instead include other animations of the opponent?
For example is (fall4)?

Thank you so much for your help, for your labor
I want to be able to do something, or donate an operating fee to the website. I don't know if this proposal is suitable?
thank you very much for your help:):):)
 
While grabbed all opponents animations will shadow this works the same as opponent shadows for grabbing moves in street fighter alpha.

Some developers have patreon if you want to support them directly and you can also donate to the forum hosting cost.
 
Can someone please help me understand the differences between shadowon script vs update/updated?
Bloodbane helped me setup the SP in the shadowon script to display the SP point information on the screen a while back.
Everything is working fine.
Now I am using the same format to display the EX point information.
Furthermore, I am adding the SP bar in the shadowon script. I know this could be done in the update.c just like FF Ultimate LNS.
I am just curious what the differences between shadowon scrip and update/updated.
In another words, which way is better????

Thank you

Edited:
Sorry I got it mixed up...
msmalik681 actually was the one who helped me about the SP setup a while back.
 
Last edited:
Shadowon.c script is a update script so it run continuously while the entity is alive just like updated.c. what is better, well its situational if you only want to run a script while a entity is alive use ondraw otherwise to run all the time use updated.c
 
Shadowon.c脚本是一个更新脚本,因此它会在实体存在时运行,就像updated.c一样。更好的是,如果您中断在实体存在时运行脚本,则使用ondraw,否则要一直运行,请使用updated.c
This script I have recently found a friend to help me improve, he has been able to include the opponent can also appear shadow
But it does not use the update file
 

Attachments

  • Honeycam 2025-01-02 17-37-28.gif
    Honeycam 2025-01-02 17-37-28.gif
    2.6 MB · Views: 7
Last edited:
Back
Top Bottom