[Script] [ACE] Script hiển thị thành tích - Khuyến mãi MK4 characters

in RPG Maker
TOPIC KIA EM POST LỘN BOX BÁC MOD NÀO DEL DÙM EM VỚI ĐI 
Script mang tên: Visão dos eventos :thichthu:
# Coloque Condição, vá na quarta aba terá script
# Na parte de script escreva
# checkdistance(dist)
# Aonde dist é a distancia que ativará a condição, por exemplo.
# checkdistance(3)
# Ele verifica se o evento verá o personagem a 3 tiles de distancia.
# checkradius(50)
# Ele verifica se o evento verá o personagem a 50 pixels de distancia do personagem
# em todas as direções.
class Game_Interpreter
def checkdistance(dist)
cx = $game_map.events[@event_id].x - $game_player.x
cy = $game_map.events[@event_id].y - $game_player.y
cx *= -1 if cx <= 0
cy *= -1 if cy <= 0
return true if cx <= dist and cy <= dist
return false
end
def checkradius(dist)
cx = $game_map.events[@event_id].screen_x - $game_player.screen_x
cy = $game_map.events[@event_id].screen_y - $game_player.screen_y
dist *= dist
cx *= cx
cy *= cy
return true if cx + cy <= dist
return false
end
end
Mỗi lần kết thúc 1 event, trên góc bên trái màn hình sẽ xuất hiện thêm 1 ngôi sao để trưng bày thành tích, có thể thay star bằng những image khác mà bạn thích ở chỗ thư mụcGraphic/Picture :caocao:







Tặng kèm Nhân vật Mortal Combat cho những ai yêu thích MK4, nếu để ý thì sẽ thấy trong đó có cả 2 super hero trong Marvel :uynhnhau:
Link Download Demo never die: forums.rpgmakerweb.com/index.php?/files/download/32-restaff-september-2012-release/

Script mang tên: Visão dos eventos :thichthu:
# Coloque Condição, vá na quarta aba terá script
# Na parte de script escreva
# checkdistance(dist)
# Aonde dist é a distancia que ativará a condição, por exemplo.
# checkdistance(3)
# Ele verifica se o evento verá o personagem a 3 tiles de distancia.
# checkradius(50)
# Ele verifica se o evento verá o personagem a 50 pixels de distancia do personagem
# em todas as direções.
class Game_Interpreter
def checkdistance(dist)
cx = $game_map.events[@event_id].x - $game_player.x
cy = $game_map.events[@event_id].y - $game_player.y
cx *= -1 if cx <= 0
cy *= -1 if cy <= 0
return true if cx <= dist and cy <= dist
return false
end
def checkradius(dist)
cx = $game_map.events[@event_id].screen_x - $game_player.screen_x
cy = $game_map.events[@event_id].screen_y - $game_player.screen_y
dist *= dist
cx *= cx
cy *= cy
return true if cx + cy <= dist
return false
end
end
Mỗi lần kết thúc 1 event, trên góc bên trái màn hình sẽ xuất hiện thêm 1 ngôi sao để trưng bày thành tích, có thể thay star bằng những image khác mà bạn thích ở chỗ thư mụcGraphic/Picture :caocao:







Tặng kèm Nhân vật Mortal Combat cho những ai yêu thích MK4, nếu để ý thì sẽ thấy trong đó có cả 2 super hero trong Marvel :uynhnhau:
Link Download Demo never die: forums.rpgmakerweb.com/index.php?/files/download/32-restaff-september-2012-release/