Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
The daemon head itself is just a wall-decoration.
To let it spit - let's say - fireballs, you have to use an object in the editor called "Spawner" - with "setEntity" set to "fireball". The spawner itself must be triggered/started by something else. It could be a timer-object, a pressure-plate (visible) or a floortrigger (invisible). All of them have to be connected with the spawner (in their submenu in the editor).
To let it spit - let's say - fireballs, you have to use an object in the editor called "Spawner" - with "setEntity" set to "fireball". The spawner itself must be triggered/started by something else. It could be a timer-object, a pressure-plate (visible) or a floortrigger (invisible). All of them have to be connected with the spawner (in their submenu in the editor).
Re: Ask a simple question, get a simple answer
Many thanks! Now everything is clear.
Re: Ask a simple question, get a simple answer
Tell me please - why the bossfight begins with an incomplete strip of health boss?
And how can this be remedied?
And how can this be remedied?
Re: Ask a simple question, get a simple answer
That happens if you include monsters in your bossfight with a monsterlevel higher than 1...
Re: Ask a simple question, get a simple answer
It means that the boss fight's original max HP total became accurate, either because of adding new monsters or increasing the maximum health of existing monsters. One possibility is that you increased a monster's level after adding it to the boss fight, yes. To fix this, just call BossFightComponent:recomputeTotal() after adding the new monsters/leveling up the monsters.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Ask a simple question, get a simple answer
I'm an absolute newbie in moding and do not understand where to insert a string "BossFightComponent:recomputeTotal()".minmay wrote:To fix this, just call BossFightComponent:recomputeTotal() after adding the new monsters/leveling up the monsters.
If it's not difficult, give a simple example or screenshot...
Re: Ask a simple question, get a simple answer
What this means is to call the recomputeTotal() function of the bossfight component in your bossfight object. [These can exist with arbitrary names, so a literal description is given.]Badgert wrote:I'm an absolute newbie in moding and do not understand where to insert a string "BossFightComponent:recomputeTotal()".minmay wrote:To fix this, just call BossFightComponent:recomputeTotal() after adding the new monsters/leveling up the monsters.
If it's not difficult, give a simple example or screenshot...
So if the bossfight object ID is "huge_rat_encounter_01", and the bossfight component has the default name of 'bossfight', then it means to call from in a script: huge_rat_encounter_01.bossfight:recomputeTotal()
**That said... This doesn't seem to work for me; or not as expected. In a test map, I added a level 3 rat_boss, activated the encounter and called recomputeTotal() and it didn't correct the life-bar. I added other ratlings on a timer, and each one added their HP to the bar, but it still remained less than half filled... Even with many calls to recomputeTotal().
Re: Ask a simple question, get a simple answer
The boss fight bar uses the ratio of all the monsters' health to their maximum health. If you add a level 3 ratling_boss in the editor with the default health, and make no other changes, it starts with 4,200 out of 12,600 health. So it starts at 33% health, and therefore the boss fight bar will be 33% full when the total is computed correctly, because the ratling boss is already injured.Isaac wrote:**That said... This doesn't seem to work for me; or not as expected. In a test map, I added a level 3 rat_boss, activated the encounter and called recomputeTotal() and it didn't correct the life-bar. I added other ratlings on a timer, and each one added their HP to the bar, but it still remained less than half filled... Even with many calls to recomputeTotal().
Fixing this is just a matter of calling ratling_boss_1.monster:setMaxHealth(ratling_boss_1.monster:getHealth()) after you level it up.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Ask a simple question, get a simple answer
And there it is; everything makes sense again.
Thanks for the explanation.
Thanks for the explanation.
Re: Ask a simple question, get a simple answer
How do you create new power attacks to add to weapons you're creating? i've tried copy pasting code from the backbiter for example but it come up with a error method like leech is strictly designed for it and the boneblade. i want to make a melee power attack hit all monsters in a square like a group of 4 zombies for example or one that executes people sizesd creatures named "decapitate"
Code: Select all
defineObject{
name = "damned_sword",
baseObject = "base_item",
components = {
{
class = "Model",
model = "mod_assets/models/damned_sword.fbx",
},
{
class = "Item",
uiName = "The Teehee Blade",
gfxAtlas = "mod_assets/textures/mod_items.tga",
gfxIndex = 7,
weight = 8,
impactSound = "impact_blade",
traits = { "two_handed", "light_weapon", "sword", "reach"},
description = "NOT FOR YOU"
},
{
class = "MeleeAttack",
attackPower = 32,
accuracy = 10,
swipe = "horizontal",
attackSound = "swipe_heavy",
requirements = {"light_weapons", 3},
cooldown = 4,
baseDamageStat = "dexterity",
damageType = "physical",
},
{
class = "MeleeAttack",
name = "cleave2",
uiName = "Cleave",
attackPower = 50,
accuracy = 0,
cooldown = 8,
energyCost = 40,
swipe = "horizontal",
attackSound = "swipe_heavy",
requirements = { "light_weapons", 5 },
--WTF GOES HERE
-------------------------OR
class = "MeleeAttack",
name = "decapitate",
uiName = "Decapitate",
attackPower = 40,
accuracy = -10,
cooldown = 6,
energyCost = 75,
swipe = "horizontal",
attackSound = "swipe_heavy",
requirements = { "light_weapons", 5 },
onHitMonster = function(self, monster, side, dmg, champion)
if monster = "all the monsters i want" (i hope there's an easier way lol)
monster:die()
end,
--WTF GOES HERE
},
},
tags = { "weapon" },
}
I smell you, i do! You GRADUNK! No be hiding on TORGAL!