Script by Kata.
with editing this script, you can put items or scenaries on/ above on a player, or polygons.
Kataさんのスクリプトです。
これを応用すると、プレイヤーの頭上にアイテムや背景を配置したりといったことも可能になります。
--[[ Mapにプレイヤーの位置を表示する ]]
--Showing whereabout of each players
Triggers = {}
function Triggers.init() 
--in this section put annotations for each joined players.
--coodinates?? we will do it later ok?
--このセクションではアノテーション(マップ上の文字)を
--プレイヤー毎に行っています。座標は取り敢えず適当に。
    for p in Players() do 
        p._annotation = Annotations.new(Polygons[1], " ",0 ,0)
    end
end
function Triggers.idle()
--with the function "annotation()", the annotations will keep moving.
--so they show each players' name and whereabouts.
--ここでは常にアノテーションの位置を移動するfunctionを稼働させています
    annotation()
end
function annotation()
--this function works every tick in the game so annitation moves.
--アノテーションの位置を常に移動するためのfunction。
    for p in Players() do
        p._annotation.polygon = p.polygon
        p._annotation.text = "+ "..p.name..""
 --プレイヤーの位置が分かりやすくなるよう、
        p._annotation.x = p.x
 --「+」記号とプレイヤー名を
        p._annotation.y = p.y
 --プレイヤーの座標に表示する。
    end
-- to show whereabouts,  annitation become "+" and "each player's name" and 
--coodinate(x, y)  moves.
--example in game, "+ lilax"
end
PR