Ask a simple question, get a simple answer

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
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

Probably setting the AI to 'Guard'.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

BrainComponent:pursuit() just finds a path to the party and makes the first move or turn along that path. I don't know what you're trying to do with the spell, but I seriously doubt BrainComponent:pursuit() is what you want.
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.
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

edit: removed script

:lol: There is an easier way than the monsterAction I posted... Just set the AI to default if it was set to guard.

**Or did I miss something about your post... Is it not [just?] about getting the viper_root to attack?
Last edited by Isaac on Tue Nov 15, 2016 10:30 pm, edited 9 times in total.
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: Ask a simple question, get a simple answer

Post by AndakRainor »

The same behavior as when a monster is damaged by a champion with a projectile and a tiledamager. Drain life bolt has no tiledamager component. What you say about pursuit being one step only is odd, so far using pursuit has always made other monsters continue to follow the party. But maybe the first step has always been enough for the monster to detect the party.
Last edited by AndakRainor on Tue Nov 15, 2016 10:31 pm, edited 1 time in total.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

Ah. Quite a bit happens when a monster is damaged, and absolutely none of it is BrainComponent:pursuit(), I'm afraid.
- Their AI becomes a little more aggressive for 10 game seconds as measured by Time.currentTime()
- They call the MonsterComponent.onBloodied hook if their health fell below 0.25 from the damage
- They check morale and maybe flee
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.
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: Ask a simple question, get a simple answer

Post by AndakRainor »

@Minmay: also MonsterComponent:setAIState("default") when damaged I suppose?

@Isaac: yes, and I think it is better to fix the spell definition than modifying monsters definitions. It will keep the spell pack easier to share :)
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

AndakRainor wrote:@Minmay: also MonsterComponent:setAIState("default") when damaged I suppose?
Effectively, yes.
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.
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Ask a simple question, get a simple answer

Post by akroma222 »

Just quickly - while on the topic of Viper Roots chasing the party - I will link to CainOrdamoth's thread:
viewtopic.php?f=22&t=14541
where Zimber defines a Viper Root that can chase the party across elevations
kelly1111
Posts: 349
Joined: Sun Jan 20, 2013 6:28 pm

Re: Ask a simple question, get a simple answer

Post by kelly1111 »

Is there such a thing as an inside heightmap / height elevation. I mean how do you define it say for instance the mine tileset?
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

kelly1111 wrote:Is there such a thing as an inside heightmap / height elevation. I mean how do you define it say for instance the mine tileset?
It can be done, but most of the tile-sets (I think all of them) have problems connecting seamlesly in places influenced by the heightmap. This usually leaves holes that would need patched with custom placed [if not custom designed] mesh models, to hide the mismatching seams.

Even the forest tile set has this problem where elevation ledges exist in the influence of a heightmap.
Post Reply