Script not executed

Toranks

Active member
I have found certain characters that have these scripts activated:
Code:
animationscript	data/scripts/escript.c
ondrawscript	data/scripts/water_puddle_script.c
script		data/scripts/player_script.c

And others that have this:

Code:
animationscript	data/scripts/grabscript.c
ondrawscript	data/scripts/water_puddle_script.c
script		data/scripts/player_script.c

Apparently the first execute player_script.c content, but the second do not. Where should I look to find out the error? What could be happening?
Note: escript.c have much more content than grabscript.c which I think is the reason to use grabscript.c instead of escript.c on some characters.
Thanks
 
What makes you think the second one doesn't run the script? depending on the script, there are some possibilities this could happen

We need to see player_script.c to understand
 
This is an script to create shadows in certain animations, and to limit the maximum of lives to 15.
I know it doesn't work because I can have all the lives I win with those characters (those who have grabscript.c instead of escript.c) and the shadows aren't created.

Code:
#import "data/scripts/shadowtrail.c"

void main()
{
	void player = getlocalvar("self");
	void anim = getentityproperty(player,"animationID");
	void lv = getplayerproperty(player, "lives");
	check_shadow_trail(player);


	if ( anim == openborconstant("ANI_FREESPECIAL27") || anim == openborconstant("ANI_FREESPECIAL26"))
	{
	set_shad_trail_flag(player,1);
    	} 
	else if ( anim == openborconstant("ANI_FREESPECIAL27") || anim == openborconstant("ANI_FREESPECIAL26"))
	{
 	set_shad_trail_flag(player,0);
	} 
	else if ( anim != openborconstant("ANI_FREESPECIAL27") || anim == openborconstant("ANI_FREESPECIAL26"))
	{
        set_shad_trail_flag(player,0);
	}
	if ( lv > 15 )
	{
   	changeplayerproperty(player, "lives", 15);
	}
}
 
Back
Top Bottom