| 作者: Danexx | |
| 2005-03-24 | |
|
首先说说什么是 GAME CACHE ,字面意思就是 游戏缓存 ,
用于开辟一个内存空间来保存用户希望 保留 的数据(最后需要将 CACHE 保存到 硬盘上)。 主要作用是将 地图A 的一些数据保留到 地图B 中,比如战役中英雄的等级或者道具技能什么什么的, GAME CACHE 是用 TRIGGER EDITOR 来操作的~~下面说说相关 ACTIONS 的含义…… 1]创建一个缓存~~想要使用缓存~~当然要先创建啦~~ Game Cache - Create a game cache from MapName.w3v 这就是一个创建 CACHE 语句~~后面的 MapName.w3v 是你创建的 CACHE 的名字~~:)~~ 2]创建以后~~就可以用他来保存资料了~~ Game Cache - Store Unit as Lable of Category in (Last created game cache) 这是一个 保存单位 的语句~~在 Unit 处选好需要保存的单位~~填写好 标识(Lable) 和 分类(Category) ~~最后 选择将 单位保存到 哪个 CACHE 里面~~其中 标识 和 分类是可以随意填写的~~:)~~ 类似的~~还有下面一些类型的数据可以保存到 CACHE 里面~~使用方法同上! Game Cache - Store Real as Lable of Category in (Last created game cache) Game Cache - Store Integer as Lable of Category in (Last created game cache) Game Cache - Store Boolean as Lable of Category in (Last created game cache) Game Cache - Store String as Lable of Category in (Last created game cache) (UNIT:单位 / REAL:实数 / INTEGER:整数 / BOOLEAN:布尔 / STRING:字符串) 保存玩需要的数据后不要忘记保存 CACHE 本身~~ Game Cache - Save (Last created game cache) 上面说的是保存数据~~但是怎么取出数据呢?~~ 首先在任何可以使用 你想取出的数据类型 的地方都可以通过 GAME CACHE - LOAD XXXXXX CALUE 来取出数据~~ 另外~~ Game Cache - Restore lable of Category from (Last created game cache) for Player 1 (Red) at (Center of (Playable map area)) facing 0.00 Game Cache - Restore lable of Category from (Last created game cache) for Player 1 (Red) at (Center of (Playable map area)) facing (Position of (Triggering unit)) 这个语句是专门用于 取出一个被保存的单位且放置在地图上的~~ 最后~~如果想清除 CACHE 中的数据可以使用下面两个语句~~ Game Cache - Clear (Last created game cache) 清除所有数据~~ Game Cache - Clear all labels of Category in (Last created game cache) 清除某一类的数据~~ |
责任编辑:admin
进入论坛参与针对本文章的讨论
