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
THOM
Posts: 1274
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Ask a simple question, get a simple answer

Post by THOM »

Hey Isaac - would this be a script that I have to trigger with a timer?
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
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 »

No, it triggers when the monster ends its move into the same tile (and elevation) as the script_entity.

*You replace the demo print instructions with your own, and/or a call to a different script/function; but you would have to pass along the target or target's id, if you want to have that available to the called script.
Last edited by Isaac on Sat Nov 21, 2015 10:18 pm, edited 1 time in total.
User avatar
THOM
Posts: 1274
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Ask a simple question, get a simple answer

Post by THOM »

Well, but - how is it getting started? Or in other words: where do I have to put it?
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
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 »

Use the script entity itself just as you would a pressure plate. Whenever the monster moves it executes the check conditions, and when the monster is on the same tile (and same elevation) as the script entity, the instructions are triggered.

The only other requirement is to add the monster's ID into the monster table. For performance reasons the script only works with the ids listed in the table.

(More than one monster ID can be added, and they will each trigger the script individually ~when they "step on it".)

** Duplicates of this script (with different triggered instructions) can be used in other locations; or optionally all of the duplicates can instead call a specific custom script/function rather duplicating it in each copy.
User avatar
THOM
Posts: 1274
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Ask a simple question, get a simple answer

Post by THOM »

Great, Isaac. Implemented it several times and it works perfect. Thanks!
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
User avatar
Eleven Warrior
Posts: 746
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Ask a simple question, get a simple answer

Post by Eleven Warrior »

beach_ocean Object:

Is it possible to make the (AB) object cover the whole map? If you have a Island in the middle of the map and water all around you have to add 2 beach_ocean objects to the map to get the distant ocean effect. North, South etc...
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 »

Eleven Warrior wrote:beach_ocean Object:

Is it possible to make the (AB) object cover the whole map? If you have a Island in the middle of the map and water all around you have to add 2 beach_ocean objects to the map to get the distant ocean effect. North, South etc...
I tried it with two some time back, and hid the seam reasonably well with shipwrecks.
User avatar
Eleven Warrior
Posts: 746
Joined: Thu Apr 18, 2013 2:32 pm
Location: Australia

Re: Ask a simple question, get a simple answer

Post by Eleven Warrior »

Yeah thxs Issac I did that but it's the distant beyond the actual map mate. So I want to make one that covers the whole map so I don't have to use objects to cover
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 3D model is too small for that, but maybe it could be done with a bigger custom model.
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 »

Then it will take five of them to pull that off; and the island cannot approach the edge of the map too close.

But the main problem will be flooded stairwells if you have any on the island.
Post Reply