White Dragon
New member
draw_shadowtrail(entity, trails_num, refresh_time, min_transp, max_transp, flag,last_frame);
Parameters:
entity: entity that you want to track
trails_num: numbers of trails
refresh_time: frames to wait to generate a sprite for the trail
min_transp and max_transp: for transparency. it is the channel rgb
swap_flag: 0 or 1. sprite swapping into trail. (I prefer 0)
turnoff_flag: 0 == off, 1 == on
alpha: 1 to 6 (alpha fusion method)
color: this is the shadowtrail color. set it with function -> rgbcolor(0x00,0x00,0xFF)
map: map of shadowtrail (int)
clear_shadowtrail(entity) to clear all localvars.
TO USE IT:
1) download and copy files into data/scripts:
http://www.mediafire.com/download/k04t9plhnd2rvgq/lib_shadowtrail.zip
2) write in your character entity text file:
script data/scripts/player_script.c
and in player_script.c write (EXAMPLE):
Now in part 2 change "CHARACTER_NAME" with your charcter name, "ANI_ATTACK1" with your shadowtrail attack/animation and 7 with your frame where the shadowtrail stops.
Parameters:
entity: entity that you want to track
trails_num: numbers of trails
refresh_time: frames to wait to generate a sprite for the trail
min_transp and max_transp: for transparency. it is the channel rgb
swap_flag: 0 or 1. sprite swapping into trail. (I prefer 0)
turnoff_flag: 0 == off, 1 == on
alpha: 1 to 6 (alpha fusion method)
color: this is the shadowtrail color. set it with function -> rgbcolor(0x00,0x00,0xFF)
map: map of shadowtrail (int)
clear_shadowtrail(entity) to clear all localvars.
TO USE IT:
1) download and copy files into data/scripts:
http://www.mediafire.com/download/k04t9plhnd2rvgq/lib_shadowtrail.zip
2) write in your character entity text file:
script data/scripts/player_script.c
and in player_script.c write (EXAMPLE):
Code:
#import "data/scripts/shadowtrail.c"
void main() {
void player = getlocalvar("self");
check_shadow_trail(player);
if ( getentityproperty(player, "defaultmodel") == "CHARACTER_NAME" && getentityproperty(player, "animationid") == openborconstant("ANI_ATTACK1")
&& getentityproperty(player, "animpos") < 7 ) {
set_shad_trail_flag(player,1);
//draw_shadowtrail(player, 5, 15, 20, 160, 0);
} else if ( getentityproperty(player, "defaultmodel") == "CHARACTER_NAME" && getentityproperty(player, "animationid") == openborconstant("ANI_ATTACK1")
&& getentityproperty(player, "animpos") >= 7 ) {
set_shad_trail_flag(player,0);
clear_shadowtrail(player);
} else if ( getentityproperty(player, "defaultmodel") == "CHARACTER_NAME" && getentityproperty(player, "animationid") != openborconstant("ANI_ATTACK1")
&& get_shad_trail_flag(player) != 0 ) {
set_shad_trail_flag(player,0);
clear_shadowtrail(player);
}
}
Now in part 2 change "CHARACTER_NAME" with your charcter name, "ANI_ATTACK1" with your shadowtrail attack/animation and 7 with your frame where the shadowtrail stops.