#define STAT_IDLE 0 #define STAT_MOVE_TO_POINT 1 #define STAT_MOVE_ON_PATH 2 #define STAT_ON_PLAY_EVENT 3 #define PROG_START 0 #define PROG_UPDATE 1 #define PROG_END 2 func chara_move_wait(int kind,int id ,int type ) { int exist_flag; int state_flag; int result_flag; exist_flag = 0; state_flag = 0; result_flag = 0; exist_flag = CharaGetProgress( kind, id, type , state_flag ); if( (exist_flag == 1) && (state_flag == PROG_END) ) { result_flag = 1; }else{ if( exist_flag == 0 ) { result_flag = 1; } } return result_flag; } table path_tbl1(float x,float y,float z) { 756.149963 , 0.010000 , 611.469727 741.619751 , 0.010000 , 586.811035 731.060242 , 0.010000 , 561.922180 694.335205 , 0.010000 , 547.679688 651.113403 , 0.010000 , 537.766663 645.830872 , 0.010000 , 528.005371 }; table path_tbl3(float x,float y,float z) { 641.662292 , 0.010000 , 511.545929 602.772278 , 0.010000 , 510.432526 579.229492 , 0.010000 , 510.402618 497.945282 , 0.010000 , 510.775360 426.689941 , 0.010000 , 510.391235 340.832489 , 0.010000 , 509.275177 292.443878 , 0.010000 , 510.433075 250.043259 , 0.010000 , 510.664581 }; table path_tbl5(float x,float y,float z) { 332.719513 , 0.010000 , 495.048401 398.519867 , 0.010000 , 497.710602 454.665558 , 0.010000 , 501.562927 469.127594 , 0.010000 , 525.611938 469.242767 , 0.010000 , 565.712219 470.703400 , 0.010000 , 612.106934 472.337158 , 0.010000 , 654.860229 473.163239 , 0.010000 , 659.789612 }; table path_tbl7(float x,float y,float z) { 508.310486 , 84.010002 , 655.978149 547.682861 , 84.010002 , 651.255432 579.237671 , 84.010002 , 655.169922 611.661316 , 84.010002 , 668.978638 607.562683 , 84.010002 , 698.050232 616.721008 , 84.010002 , 746.989990 }; table path_tbl9(float x,float y,float z) { 621.248901 , 84.010002 , 779.905640 615.756104 , 84.009995 , 816.484619 503.009979 , 84.010002 , 819.131653 }; func Event1(int char_handle) { if ( ScriptEventGet(1) == 1 ) { CharaMoveOnPath( 0 , 0 , tblsize(path_tbl1), path_tbl1 ); sync( chara_move_wait( 0, 0 ) ); ScriptEventDelete( 1 ); return 1; } return 0; } func Event2(int char_handle) { sync( chara_move_wait(0,0) ); //角度の調整 CharaSetRotY( 0 , 0 , 1.853396); //アクション CharaSetActionID( 0 , 0 , 5, 1 ); //ScriptEventDelete( 0 ); return 1; return 0; } func Event3(int char_handle) { if ( ScriptEventGet(2) == 1 ) { CharaMoveOnPath( 0 , 0 , tblsize(path_tbl3), path_tbl3 ); ScriptEventDelete( 2 ); return 1; } return 0; } func Event4(int char_handle) { sync(1); sync( chara_move_wait(0,0) ); //アクション CharaSetActionID( 0 , 0 , 2, 1 ); //ScriptEventDelete( 0 ); return 1; return 0; } func Event5(int char_handle) { if ( ScriptEventGet(3) == 1 ) { CharaMoveOnPath( 0 , 0 , tblsize(path_tbl5), path_tbl5 ); ScriptEventDelete( 3 ); return 1; } return 0; } func Event6(int char_handle) { sync(1); sync( chara_move_wait(0,0) ); //位置の調整 CharaSetPos( 0 , 0 , 508.310486,84.010002,655.978149); //ScriptEventDelete( 0 ); return 1; return 0; } func Event7(int char_handle) { CharaMoveOnPath( 0 , 0 , tblsize(path_tbl7), path_tbl7 ); //ScriptEventDelete( 0 ); return 1; return 0; } func Event8(int char_handle) { sync(1); sync( chara_move_wait(0,0) ); //アクション CharaSetActionID( 0 , 0 , 8, 1 ); //位置の調整 CharaSetPos( 0 , 0 , 614.832275,90.010002,756.274658); //アクション CharaSetActionID( 0 , 0 , 8, 1 ); //位置の調整 CharaSetPos( 0 , 0 , 621.248901,84.010002,779.905640); //ScriptEventDelete( 0 ); return 1; return 0; } func Event9(int char_handle) { CharaMoveOnPath( 0 , 0 , tblsize(path_tbl9), path_tbl9 ); ScriptEventDelete( 0 ); return 1; return 0; } func main() { int char_handle; int flag; char_handle = CharaCreate( 0 , 0 , 823.912109 , 0.010000 ,619.827454 , 0.0 ,4.405526 ,0.0 ); sync(Event1(char_handle)); sync(Event2(char_handle)); sync(Event3(char_handle)); sync(Event4(char_handle)); sync(Event5(char_handle)); sync(Event6(char_handle)); sync(Event7(char_handle)); sync(Event8(char_handle)); sync(Event9(char_handle)); }