Re: Ask a simple question, get a simple answer
Posted: Sat Apr 06, 2019 7:20 am
Thanks minmay for helping my retardedness
Official Legend of Grimrock Forums
http://grimrock.net/forum/
Nevermind : I damaged each champion.
Code: Select all
party.party:getChampion(1):damage(80,"fire")
party.party:getChampion(2):damage(80,"fire")
party.party:getChampion(3):damage(80,"fire")
party.party:getChampion(4):damage(80,"fire")
The way to damage the party by script, is to the damageTile global function:Marskilla wrote: ↑Mon Apr 08, 2019 7:28 pm Went there : viewtopic.php?t=7972 but I didn't found how to damage party by script.
Code: Select all
damageTile(level, x, y, direction, elevation, flags, damageType, power)
Question about this script. Is there a way to make a script that does the same thing but then for wall decorations? And if so any help on how?vanblam wrote: ↑Sat Apr 06, 2019 6:59 amSo like that?Code: Select all
if choice3 >= 0.4 then spawn("rc_ground_pebbles_04",g.level,g.x,g.y,math.random(0,3),g.elevation) elseif choice3 >= 0.5 then spawn("rc_ground_pebbles_01",g.level,g.x,g.y,math.random(0,3),g.elevation) elseif choice3 >= 0.6 then spawn("rc_ground_pebbles_02",g.level,g.x,g.y,math.random(0,3),g.elevation) elseif choice3 >= 0.7 then spawn("rc_ground_pebbles_03",g.level,g.x,g.y,math.random(0,3),g.elevation) end
Code: Select all
defineObject{
name = "mine_platform_chains_moving",
baseObject = "base_floor_decoration",
components = {
{
class = "Model",
model = "mod_assets/models/mine_platform.fbx",
staticShadow = true,
offset = vec(0, 0, 0),
},
{
class = "DynamicObstacle",
enabled = false,
},
{
class = "PushableBlock",
},
{
class = "PushableBlockFloor",
name = "controller",
onInit = function(self)
self.go.controller:setInitialState(true)
end,
},
{
class = "Model",
name = "chain1",
model = "mod_assets/models/mine_platform_chain.fbx",
staticShadow = true,
offset = vec(1.5, 0, 1.5),
},
{
class = "Model",
name = "chain2",
model = "mod_assets/models/mine_platform_chain.fbx",
staticShadow = true,
offset = vec(1.5, 0, -1.5),
},
{
class = "Model",
name = "chain3",
model = "mod_assets/models/mine_platform_chain.fbx",
staticShadow = true,
offset = vec(-1.5, 0, 1.5),
},
{
class = "Model",
name = "chain4",
model = "mod_assets/models/mine_platform_chain.fbx",
staticShadow = true,
offset = vec(-1.5, 0, -1.5),
},
--[[ {
class = "Platform",
},]]
},
minimalSaveState = true,
}
Code: Select all
defineObject{
name = "mine_platform_chains_moving",
baseObject = "base_floor_decoration",
components = {
{
class = "Model",
model = "mod_assets/models/mine_platform.fbx",
staticShadow = true,
offset = vec(0, 0, 0),
},
{
class = "DynamicObstacle",
enabled = false,
},
{
class = "PushableBlock",
onInit = function(self)
self:activate()
end,
},
{
class = "Model",
name = "chain1",
model = "mod_assets/models/mine_platform_chain.fbx",
staticShadow = true,
offset = vec(1.5, 0, 1.5),
},
{
class = "Model",
name = "chain2",
model = "mod_assets/models/mine_platform_chain.fbx",
staticShadow = true,
offset = vec(1.5, 0, -1.5),
},
{
class = "Model",
name = "chain3",
model = "mod_assets/models/mine_platform_chain.fbx",
staticShadow = true,
offset = vec(-1.5, 0, 1.5),
},
{
class = "Model",
name = "chain4",
model = "mod_assets/models/mine_platform_chain.fbx",
staticShadow = true,
offset = vec(-1.5, 0, -1.5),
},
--[[ {
class = "Platform",
},]]
},
minimalSaveState = true,
}