忍者ブログ
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

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
Name
Title
Mail
URL
Comment
Pass
Pictgram
Vodafone絵文字 i-mode絵文字 Ezweb絵文字

 
トラックバックURL
 

カレンダー

03 2024/04 05
S M T W T F S
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

 

最新コメント

[01/17 名無権兵衛]
[01/17 名無権兵衛]
[01/17 名無権兵衛]
[10/04 kata]
[10/04 RO-]

 

検索