------------------------------------------------------------------ -- \author miyazaki -- \date 2010/07/13 ------------------------------------------------------------------ -- sa29e の移動不可イベント local id = ccGetScriptId(); local targetDir = -197; local moveDist = 100; while ( true ) do ccSuspendScript(); -- プレイヤーロック ccSetAdvPlayerLockOperate( id, false ); ccSetAdvPlayerState( id, CCD_ADV_CHARA_STATE_WAIT ); ccSetAdvSupportLockOperateAll( false ); -- イベントコリジョンオフ ccSetAdvMobEventCollision( id, false ); -- メッセージ表示 local playerId = ccGetAdvPlayerCharaId(); if playerId == PL_ID_2NRT then MobUtil_AlMessageNaruto( id ); elseif playerId == PL_ID_2SSK then MobUtil_TalkMsgLeader( id, "talk_al_sys_12" ); end 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 ); ccWaitPlayerAct( id ); ccSuspendScript(); -- イベントヒットを復活 ccSetAdvMobEventCollision( id, true ); -- プレイヤーロック解除 ccSetAdvPlayerLockOperate( id, true ); ccSetAdvSupportLockOperateAll( true ); end -- while(true)