------------------------------------------------------------------ -- \author miyazaki -- \date 2010/04/22 ------------------------------------------------------------------ -- よろず屋 への移動不可イベント local id = ccGetScriptId(); local targetDir = -150; local moveDist = 100; -- 進行度によって設定 local chap = ccGetAdvMainChapter( id ); local seq = ccGetAdvMainSequence( id ); -- 「許可書配布」任務の進行度 local eventSeq = ccGetSubEventSequenceById( "m_sub02" ); -- 序章で、シズネから許可書をもらった後ならヒットを無効にする if chap == 0 and eventSeq > 0 then MobUtil_SetMobDisp( id, false ); end while ( true ) do ccSuspendScript(); -- プレイヤーロック ccSetAdvPlayerLockOperate( id, false ); ccSetAdvPlayerState( id, CCD_ADV_CHARA_STATE_WAIT ); ccSetAdvSupportLockOperateAll( false ); -- イベントコリジョンオフ ccSetAdvMobEventCollision( id, false ); MobUtil_SysMsg( id, "talk_al_sys_03" ); 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)