超级玩家
 
- 贡献度
- 17
- 金元
- 7397
- 积分
- 808
- 精华
- 0
- 注册时间
- 2010-7-12
|
本帖最后由 Have.Fun 于 2014-3-1 14:18 编辑
yzzn2009 发表于 2014-3-1 13:25 
"坑爹坑娘坑奶奶"说的对,点燃标签必须有目标,召唤标签才可使用坐标
...
刚才我没表达清晰,应该是装备打火机后,右键原地生成一个 "willowfire" 。
或者是右键点 Willow 会生成一个 "willowfire" ,也不错。
或是把以下命令的 “召唤动作” ,改成 “点燃动作” 。
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("willowfire")
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
|
|