幻想森林

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2434|回复: 0

[入门教程] 事件版地图显示头像和血魔

[复制链接]

14

主题

60

帖子

1万

积分

⑧专业

积分
13647
发表于 2011-4-26 14:45:25 | 显示全部楼层 |阅读模式
事件版地图显示头像和血魔


事件脚本加入:(随行处理)
$game_map.screen.pictures[1].show("头像", 0, 0, 0, 100, 100, 255, 0)    # 头像尺寸96x96px  放在\Graphics\Pictures下
$game_map.screen.pictures[2].show("血魔底色", 0, 0,96,100, 100, 255, 0)  # 血魔底色96x10px  黑色块
$game_map.screen.pictures[3].show("血魔底色", 0, 0,106,100, 100, 255, 0)
$actors1_hp=$game_actors[1].hp*100/$game_actors[1].maxhp         #定义变量$actors1_hp=角色实际血量展总血量的百分比
$actors1_mp=$game_actors[1].mp*100/$game_actors[1].maxmp      #定义变量$actors1_mp=角色实际魔量展总魔量的百分比
$game_map.screen.pictures[4].show("血", 0, 0,96, $actors1_hp, 100, 255, 0)      # 血魔底色96x10px  红色块
$game_map.screen.pictures[5].show("魔", 0, 0,106, $actors1_mp, 100, 255, 0)   # 血魔底色96x10px   蓝色块
------------------------------------------------------------------------------------------------------------------
事件显示图片方法:
$game_screen.pictures[number].show(name, origin, x, y, zoom_x, zoom_y, opacity, blend_type)
其中:
  #     name       : 文件名                     #     origin         : 原点
  #     x            : X 坐标                          #     y                : Y 坐标
  #     zoom_x       : X 方向放大率      #     zoom_y       : Y 方向放大率
  #     opacity      : 不透明度               #     blend_type   : 合成方式
  #     duration     : 时间
pictures[number], 编号大的数字可以遮掉小的画面,如pictures[2]遮掉pictures[1]
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|幻想森林

GMT+8, 2024-3-29 18:28 , Processed in 0.015951 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表