------------------------------------------------------------------ -- \author miyazaki -- \date 2010/07/01 ------------------------------------------------------------------ -- 戦死報告〜 sa00gからのワープ処理 local id = ccGetScriptId(); local flag = ccIsEventFlagOn( CCD_EVENT_FLAG_WARP_MOVE ); if flag then -- ロック ccSetAdvPlayerLockOperate( id, false ); ccSetAdvPlayerState( id, CCD_ADV_CHARA_STATE_WAIT ); ccSetAdvSupportLockOperateAll( false ); local targetDir = -28; local moveDist = 1000; ccInitAdvPlayerPosition( id, 91, 295, 0 ); ccInitAdvPlayerRotation( id, 0, 0, targetDir ); local pos = ccGetPlayerPosition( id ); local dir = ccGetPlayerDirection( id ); dir = ccAdvEventVector3Normalize( dir ); dir = ccAdvEventVector3Scale( dir, moveDist ); local targetPos = ccAdvEventVector3Add( pos, dir ); -- 移動させる ccWalkAdvPlayer( id, targetPos.x, targetPos.y, targetPos.z ); ccSetAdvMobFade( id, 255, 0, 90 ); ccSuspendScript(); ccSetAdvPlayerState( id, CCD_ADV_CHARA_STATE_WAIT ); ccOffEventFlag( CCD_EVENT_FLAG_WARP_MOVE ); -- ロック解除 ccSetAdvPlayerLockOperate( id, true ); ccSetAdvSupportLockOperateAll( true ); end