carrygwl 发表于 2013-8-30 00:44

易宁的打猎游戏不只是回旋镖可以。。

发现易宁实用技巧的打猎游戏不只是回旋镖可以。其他的工具或者材料也行。
搜索其他工具的名字,例如斧头的:打开记事本\data\scripts\prefabs\axe.lua
查找inst:AddComponent("inspectable")
local function cancreatelight(staff, caster, target, pos)
    local ground = GetWorld()
    if ground and pos then
      local tile = ground.Map:GetTileAtPoint(pos.x, pos.y, pos.z)
      return tile ~= GROUND.IMPASSIBLE and tile < GROUND.UNDERGROUND
    end
    return false
end
local function createlight(staff, target, pos)
    local light = SpawnPrefab("perd")
    light.Transform:SetPosition(pos.x, pos.y, pos.z)
    local caster = staff.components.inventoryitem.owner
end
    inst:AddComponent("spellcaster")
    inst.components.spellcaster:SetSpellFn(createlight)
    inst.components.spellcaster:SetSpellTestFn(cancreatelight)
    inst.components.spellcaster.canuseonpoint = true
    inst.components.spellcaster.canusefrominventory = false
    即可装备回旋镖后,在空地上点鼠标右键召唤火鸡。其中perd(火鸡)可以替换为其他物品

carrygwl 发表于 2013-8-30 00:48

自己的SF         

310297903 发表于 2013-8-30 07:57

鼓励分享~~~~
页: [1]
查看完整版本: 易宁的打猎游戏不只是回旋镖可以。。