模拟城市中文网

 找回密码
 入住
搜索
查看: 1615|回复: 0

条件建筑(类似奖励建筑之类)的LUA文件是如何与建筑相.....

[复制链接]
发表于 2014-6-4 16:29 | 显示全部楼层 |阅读模式
条件建筑(类似奖励建筑之类)的LUA文件是如何与建筑相关联的?

这是我写的LUA文件:

--解开地热发电厂--
------------- unlocker news message -----------------

--dofile("_adv_sys.lua")
--dofile("_adv_advice.lua")
--dofile("adv_game_data.lua")
dofile("adv_cityplanning.lua")

a = create_reward_cityplanning('F56AC1B3')
function a.condition()
      if (game.g_city_rci_population < 200000
    --or game.g_power_consumed < 25000
    --or (game.reward_instance_count('032F0000') < 1)--
    )         then
            return [[text@2A0F2490]]
    else
          return reward_state.AVAILABLE
    end
end

a.once = 1
a.timeout = tuning_constants.ADVICE_TIMEOUT_LONG
a.title = [[text@A2457CFF]] -- title instance ID
a.message = [[text@1A984ED2]] -- body text instance ID
a.priority  = tuning_constants.ADVICE_PRIORITY_URGENT -- triggers popup
a.mood = advice_moods.GREAT_JOB -- green title
a.persist = 1

其中 'F56AC1B3'是该建筑的instance,可是游戏里LUA文件好像根本不起作用。把LUA文件本身的instance也改成F56AC1B3还是不行。

到底应该怎样呀,麻烦知道的大侠帮帮忙。


您需要登录后才可以回帖 登录 | 入住

本版积分规则

小黑屋|手机版|模拟城市中文网

GMT+8, 2024-5-2 23:50 , Processed in 0.020049 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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