------------------------------------------------------------------ -- \author miyazaki -- \date 2010/04/22 ------------------------------------------------------------------ -- sa24a -> sa06a への移動不可イベント -- 五封結界の札を剥がすまで(リーダー:ガイの時のみ) local id = ccGetScriptId(); local targetDir = 0; local moveDist = 100; while ( true ) do ccSuspendScript(); -- プレイヤーロック ccSetAdvPlayerLockOperate( id, false ); ccSetAdvPlayerState( id, CCD_ADV_CHARA_STATE_WAIT ); ccSetAdvSupportLockOperateAll( false ); -- イベントコリジョンオフ ccSetAdvMobEventCollision( id, false ); num = math.random( 0,1 ); if num == 0 then MobUtil_TalkMsgLeader( id, "talk_al_guy_04" ); elseif num == 1 then MobUtil_TalkMsgLeader( id, "talk_al_guy_06" ); 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)