游戏达人
![Rank: 7](static/image/common/star_level3.gif) ![Rank: 7](static/image/common/star_level2.gif) ![Rank: 7](static/image/common/star_level1.gif)
- 贡献度
- 80
- 金元
- 18912
- 积分
- 2221
- 精华
- 1
- 注册时间
- 2010-11-27
|
sinbadgame 发表于 2013-10-23 15:42 ![](static/image/common/back.gif)
求个21版 种宝石得巨鹿 种木头得树精 种丝绸得女王的修改!!!
一.种木头得树精
用记事本打开游戏目录\data\scripts\prefabs\log.lua文件,在inst:AddComponent("stackable")的下一行插入下列内容:
local function OnDeploy (inst, pt)
local leif = SpawnPrefab("leif")
if leif then
leif:PushEvent("growfromlog")
leif.Transform:SetPosition(pt.x, pt.y, pt.z)
inst.components.stackable:Get():Remove()
end
end
inst:AddComponent("deployable")
inst.components.deployable.ondeploy = OnDeploy
二.种宝石得巨鹿
用记事本打开游戏目录\data\scripts\prefabs\gem.lua文件,在MakeInventoryPhysics(inst)的下一行插入下列内容:
local function OnDeploy (inst, pt)
local deerclops = SpawnPrefab("deerclops")
if deerclops then
deerclops:PushEvent("growfromgem")
deerclops.Transform:SetPosition(pt.x, pt.y, pt.z)
inst.components.stackable:Get():Remove()
end
end
inst:AddComponent("deployable")
inst.components.deployable.ondeploy = OnDeploy
三.种蛛丝得蜘蛛女王
用记事本打开游戏目录\data\scripts\prefabs\silk.lua文件,在 MakeInventoryPhysics(inst)的下一行插入下列内容:
local function OnDeploy (inst, pt)
local spiderqueen = SpawnPrefab("spiderqueen")
if spiderqueen then
spiderqueen:PushEvent("growfromsilk")
spiderqueen.Transform:SetPosition(pt.x, pt.y, pt.z)
inst.components.stackable:Get():Remove()
end
end
inst:AddComponent("deployable")
inst.components.deployable.ondeploy = OnDeploy
|
|