Try:
Code: Select all
function onDamageMonster(self, damage, damageType)
print(self:getResistance("poison"))
print(self:getEvasion())
end
Code: Select all
function onDamageMonster(self, damage, damageType)
print(self:getResistance("poison"))
print(self:getEvasion())
end
Zo Kath Ra wrote: ↑Sun Jan 06, 2019 10:15 pm getResistance() needs a string argument, even if the Scripting Reference doesn't say so
Sweet! Thanks
Code: Select all
defineObject{
name = "throwing_knife",
baseObject = "base_item",
components = {
{
class = "Model",
model = "assets/models/items/knife.fbx",
},
{
class = "Item",
uiName = "Throwing Knife",
gfxIndex = 47,
impactSound = "impact_blade",
stackable = true,
sharpProjectile = true,
weight = 0.5,
projectileRotationSpeed = -20,
projectileRotationX = 90,
projectileRotationY = 90,
traits = { "throwing_weapon" },
},
{
class = "ThrowAttack",
attackPower = 9,
cooldown = 4,
pierce = 50,
},
},
tags = { "weapon", "weapon_throwing" },
}
It doesnt work. If I remove the beach ground it leaves me with a black void floor...lostsol wrote: ↑Thu Jan 10, 2019 12:41 am A floor model won't play nice with the Heightmap. Try removing:
floor = { "beach_ground_01", 1, },
and change heightmapMaterial to any material you want.
I'm pretty sure that will work, don't know what effect this will have on your ceiling, pillars and walls though...