This source is for "function Triggers.idle()".
"function Triggers.idle()"向けです。
Example, see right under here.
例えば、
function Triggers.idle()
   SENSOR() 
--SENSOR()を呼び出す
   -- call SENSOR()
end
などと記述して活用して下さい。
by combining this script, Sensors can indicate direction to the specified item, polygon, enemy.
なお、これを応用すれば特定のアイテム、特定のポリゴン、特定の敵キャラに対して反応させることも可能です。
----------------------------------
function SENSOR()
    for P in Players() do 
 ---各々のプレイヤーに対して
        P.compass.lua = true 
--LUAによるコンパス(動体センサー)操作ON
        P.compass.beacon = true 
        
-- every players' Sensor turned on by LUA.
        
        -- The specified player's every directions in the sensor turned on.(ne,nw,se,sw)
        if P == SAINT then
 -- "特定のプレイヤー"のセンサーは
            P.compass:all_on()
 --北東、北西、南東、南西を全てON
        -- Every players except thespecified player, the sensors indicate directions to the player.
        else
 --"特定のプレイヤー"以外のセンサーは
            P.compass.x, P.compass.y = SAINT.x, SAINT.y 
--特定のプレイヤーの位置を反映・反応させる
        end
    end
end
PR