Creating a boss battle, and Trickster questions!

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!
blueapocalyps3
Posts: 7
Joined: Sat Oct 18, 2014 12:21 am

Re: Creating a boss battle, and Trickster questions!

Post by blueapocalyps3 »

Mysterious wrote:Will do mate, ill wreck my brain trying lol. I did figure out how to spawn a monster on the map using lua script.
By the way, do you by chance know how to make Lindworm attack the Party? I wanted to mess around with the monster a bit but it just..awkwardly stands there.
User avatar
SnowyOwl47
Posts: 148
Joined: Fri Sep 12, 2014 10:41 pm

Re: Creating a boss battle, and Trickster questions!

Post by SnowyOwl47 »

This is a very confusing thing but I will figure this out and sense there really isn't any help on how to do things it probably will be hard :D
User avatar
Sorez
Posts: 73
Joined: Fri Aug 23, 2013 9:26 pm

Re: Creating a boss battle, and Trickster questions!

Post by Sorez »

Would also like to know this, since I'm trying to create a boss aswell.
User avatar
SnowyOwl47
Posts: 148
Joined: Fri Sep 12, 2014 10:41 pm

Re: Creating a boss battle, and Trickster questions!

Post by SnowyOwl47 »

I got some things figured out about accessing bosses and controlling them:(Now i haven't tested all these but I am using a good portion, and am pretty sure there all correct.)

1) Setting name in lua:

Code: Select all

boss_fight_entity.bossfight:setName("Boss Name")
2) Setting autoDeactivate in lua:

Code: Select all

boss_fight_entity.bossfight:setAutoDeactivate(BOOL)
3) Setting Music in lua:

Code: Select all

boss_fight_entity.bossfight:setMusic("Music")
4) Activating a Boss fight in lua:

Code: Select all

boss_fight_entity.bossfight:activate()
5) Deactivating a Boss fight in lua:

Code: Select all

boss_fight_entity.bossfight:deactivate()
Been trying for a while to add an monster to the boss but nothings happening but errors :twisted:
User avatar
SnowyOwl47
Posts: 148
Joined: Fri Sep 12, 2014 10:41 pm

Re: Creating a boss battle, and Trickster questions!

Post by SnowyOwl47 »

I THINK I GOT IT!!!!!!

Ok so in the coding you can say something like:

Code: Select all

boss_fight_1.bossfight:addMonster(MonsterCompenent)
Here is an example I use in my dungeon!

Code: Select all

function bossstart()
   bossfight1.bossfight:activate()
   spawn("zarchton",2,8,14,0,0,"boss1")
   bossfight1.bossfight:addMonster(boss1.monster)
   boss1.monster:setHealth(300)
   boss1.monster:setLevel(2)
end
that works!!!!!!!!!

:geek: :geek: :geek: :geek: :geek: :geek: :geek:
User avatar
SnowyOwl47
Posts: 148
Joined: Fri Sep 12, 2014 10:41 pm

Re: Creating a boss battle, and Trickster questions!

Post by SnowyOwl47 »

There is one problem with adding the monster to the boss the health is wrong for one it continues forever.

Edit: nvm you have to make sure you set the boss health before you add the monster to the boss battle But the health still shows a little wrong for me, I have the health of the monster set to 200 and it only goes half way up the monster boss battle health indicator.
User avatar
Sorez
Posts: 73
Joined: Fri Aug 23, 2013 9:26 pm

Re: Creating a boss battle, and Trickster questions!

Post by Sorez »

SnowyOwl47 wrote:I THINK I GOT IT!!!!!!

Ok so in the coding you can say something like:

Code: Select all

boss_fight_1.bossfight:addMonster(MonsterCompenent)
Here is an example I use in my dungeon!

Code: Select all

function bossstart()
   bossfight1.bossfight:activate()
   spawn("zarchton",2,8,14,0,0,"boss1")
   bossfight1.bossfight:addMonster(boss1.monster)
   boss1.monster:setHealth(300)
   boss1.monster:setLevel(2)
end
that works!!!!!!!!!

:geek: :geek: :geek: :geek: :geek: :geek: :geek:
So do I connect the LUA to the bossfight entity? Also, doing this, I wont need to spawn the monster as an entity myself, it spawns with the script, correct?
User avatar
Sorez
Posts: 73
Joined: Fri Aug 23, 2013 9:26 pm

Re: Creating a boss battle, and Trickster questions!

Post by Sorez »

Ofcourse, as we are talking about it, this guy uploaded his bossfight video: https://www.youtube.com/watch?v=dxonfsoRYOY
User avatar
SnowyOwl47
Posts: 148
Joined: Fri Sep 12, 2014 10:41 pm

Re: Creating a boss battle, and Trickster questions!

Post by SnowyOwl47 »

Sorez wrote:
SnowyOwl47 wrote:I THINK I GOT IT!!!!!!

Ok so in the coding you can say something like:

Code: Select all

boss_fight_1.bossfight:addMonster(MonsterCompenent)
Here is an example I use in my dungeon!

Code: Select all

function bossstart()
   bossfight1.bossfight:activate()
   spawn("zarchton",2,8,14,0,0,"boss1")
   bossfight1.bossfight:addMonster(boss1.monster)
   boss1.monster:setHealth(300)
   boss1.monster:setLevel(2)
end
that works!!!!!!!!!

:geek: :geek: :geek: :geek: :geek: :geek: :geek:
So do I connect the LUA to the bossfight entity? Also, doing this, I wont need to spawn the monster as an entity myself, it spawns with the script, correct?
Thats just what I did, but it will only spawn a zarchton unless you change what gets spawned.
User avatar
SnowyOwl47
Posts: 148
Joined: Fri Sep 12, 2014 10:41 pm

Re: Creating a boss battle, and Trickster questions!

Post by SnowyOwl47 »

Sorez wrote:Ofcourse, as we are talking about it, this guy uploaded his bossfight video: https://www.youtube.com/watch?v=dxonfsoRYOY
Actually I figured it out before he uploaded the video.

Thats not a lie literally I figured this out before he updated his post check the time on when my post was posted and his post on his post saying he updated it.
Post Reply