Editor Tutorials on YouTube - part 15 is out

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: Editor Tutorials on YouTube

Post by Skuggasveinn »

Part 6 is up at http://youtu.be/dxonfsoRYOY Bossfight

Anyways the trick to bossfight is to link the monster to the bossfight entity.

Code: Select all

function startBrothersBossFight()
	boss_fight_brothers.bossfight:addMonster(skeleton_commander_1.monster)   -- here we add the skeleton_commander_1 to the fight
	boss_fight_brothers.bossfight:addMonster(skeleton_commander_2.monster)   -- here we add the second commander to the fight, so the health bar for the bossfight will be both there total health.
	boss_fight_brothers.bossfight:activate()   -- here we active the fight .
end

function startMedusaBossFight()
	boss_fight_medusa.bossfight:addMonster(medusa_1.monster)
	boss_fight_medusa.bossfight:activate()

end
-- EDIT seems to show up now in full HD :D

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: Editor Tutorials on YouTube

Post by JohnWordsworth »

Just had a chance to watch these. Very cool to see the features in action :).

I might ask you to do a couple on the GMT in a few weeks time... :p
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
SnowyOwl47
Posts: 148
Joined: Fri Sep 12, 2014 10:41 pm

Re: Editor Tutorials on YouTube

Post by SnowyOwl47 »

Skuggasveinn wrote:Part 6 is up at http://youtu.be/dxonfsoRYOY Bossfight

Anyways the trick to bossfight is to link the monster to the bossfight entity.

Code: Select all

function startBrothersBossFight()
	boss_fight_brothers.bossfight:addMonster(skeleton_commander_1.monster)   -- here we add the skeleton_commander_1 to the fight
	boss_fight_brothers.bossfight:addMonster(skeleton_commander_2.monster)   -- here we add the second commander to the fight, so the health bar for the bossfight will be both there total health.
	boss_fight_brothers.bossfight:activate()   -- here we active the fight .
end

function startMedusaBossFight()
	boss_fight_medusa.bossfight:addMonster(medusa_1.monster)
	boss_fight_medusa.bossfight:activate()

end
-- EDIT seems to show up now in full HD :D

Skuggasveinn.
Funny I just figured out how to do bosses and posted it and a little while later this new video shows up xD
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: Editor Tutorials on YouTube

Post by Skuggasveinn »

SnowyOwl47 wrote:Funny I just figured out how to do bosses and posted it and a little while later this new video shows up xD
yeah I saw :D , this video had been up on youtube some time ago if it wasn't for some youtube durping, I had to create this tutorial a couple of times before it showed up in more the 240p.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
cromcrom
Posts: 549
Joined: Tue Sep 11, 2012 7:16 am
Location: Chateauroux in a socialist s#!$*&% formerly known as "France"

Re: Editor Tutorials on YouTube

Post by cromcrom »

Yes, I saw your 240 version at least 12 hours ago ^^
A trip of a thousand leagues starts with a step.
User avatar
SnowyOwl47
Posts: 148
Joined: Fri Sep 12, 2014 10:41 pm

Re: Editor Tutorials on YouTube

Post by SnowyOwl47 »

Skuggasveinn wrote:
SnowyOwl47 wrote:Funny I just figured out how to do bosses and posted it and a little while later this new video shows up xD
yeah I saw :D , this video had been up on youtube some time ago if it wasn't for some youtube durping, I had to create this tutorial a couple of times before it showed up in more the 240p.

Now I hate youtube! :evil:

It stopped me from being able to make bosses for a while :cry:

This is something I made before I saw this video:

Code: Select all

boss1timer.timer:stop()
message = "Rubert: Whats going on!?"


function bossmode()
   party.party:shakeCamera(1, 1)
   hudPrint("You Hear a small explosion.")
   spawn("forest_oak_cluster",2,2,20,0,0,"cluster_1")
   spawn("forest_oak_cluster",2,3,20,0,0,"cluster_2")
   hudPrint("The Area behind you closes off.")
   hudPrint(message)
   boss1timer.timer:start()
end
function bossstart()
   hudPrint("Rose: Guess we better get started then.")
   bossfight1.bossfight:activate()
   spawn("zarchton",2,8,14,1,0,"boss1")
   boss1.monster:setHealth(150)
   boss1.monster:setLevel(2)
   note = spawn("note")
   boss1.monster:addItem(note.item)
   note.scrollitem:setScrollText("You Better come back or this will be your end.\n\n Slave Master")
   bossfight1.bossfight:addMonster(boss1.monster)
   script_entity_2.script.bossdead()
end
function bossdead()
   if boss1.monster:getHealth() == 0 then
      bossfight1.bossfight:deactivate()
   end
end
thats just one boss :lol:
NutJob
Posts: 426
Joined: Sun Oct 19, 2014 6:35 pm

Re: Editor Tutorials on YouTube

Post by NutJob »

Good grief! ~slaps forehead~

Anyways, thanks for the HD version. ~Matt
Ixnatifual

Re: Editor Tutorials on YouTube

Post by Ixnatifual »

Very good tutorials, Skugga. Thank you for making these.
User avatar
Sorez
Posts: 73
Joined: Fri Aug 23, 2013 9:26 pm

Re: Editor Tutorials on YouTube

Post by Sorez »

About the boss battle, my boss has 1000 health, but it only shows health up to 1/10th of the bar. Any solutions?
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: Editor Tutorials on YouTube

Post by Skuggasveinn »

This is my best guess :D since we are just guessing at this point.

setHealth is modifying the health of the monster, not the base health it has defined in the assets.

so if I do this

Code: Select all

function startBrothersBossFight()
	boss_fight_brothers.bossfight:addMonster(skeleton_commander_1.monster)
	skeleton_commander_1.monster:setHealth(15)   - here I change the health to 15
	boss_fight_brothers.bossfight:activate()
end
the bar will only fill up a to about 1/20 of they way, since the bossfight entity takes the base health of the monster, then we are setting the health lower from the base, so he comes into the fight like he is already hurt.

if I do this

Code: Select all

function startBrothersBossFight()
	boss_fight_brothers.bossfight:addMonster(skeleton_commander_1.monster)
	skeleton_commander_1.monster:setHealth(3000)   - here I change the health to 3000
	boss_fight_brothers.bossfight:activate()
end
the red line of the boss fight goes off screen.

The only way I think this will work correctly is if we define a new skeleton_commander that has his base health set to what we want, and not change the health of an existing monster.

If you are getting another result Sorez it would be nice to see your code.

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
Post Reply