How to do damage to the party on a certain tile?

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!
Post Reply
User avatar
THOM
Posts: 1281
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

How to do damage to the party on a certain tile?

Post by THOM »

Is there a way to do damage to the party just if they are on a certain tile?

I have a mechanical object that the party has to get working - but then they have to leave emediatly the tile in front of the object - otherwize they die. But how to script? I found in the Scripting Reference "TileDamager" but that doesn't seem to be an object definition. Or can I create with this a floorobject that gets spawned on the party tile and does damage in case the do not step off it?
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: How to do damage to the party on a certain tile?

Post by minmay »

TileDamager is a component. This is explained at the top of the scripting reference under "Entities and Components".
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
Zo Kath Ra
Posts: 944
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: How to do damage to the party on a certain tile?

Post by Zo Kath Ra »

Search the asset pack for files that contain the word "TileDamager".
generic.lua --> floor_spike_trap
User avatar
THOM
Posts: 1281
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: How to do damage to the party on a certain tile?

Post by THOM »

Ah - great. Thanks!

floor_spike_trap -tststs. Would have never come up to my mind...
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: How to do damage to the party on a certain tile?

Post by bongobeat »

you can use:

Code: Select all

damageTile(party.level, party.x, party.y, party.facing, party.elevation, 128, "physical", 9001
in a script, triggered by a timer and a floor trigger, and this will damage the party every time they pass on the trigger. Don't forget to add another floor trigger to desactivate the timer or the damage will not stop. Actually this will instantanly kill the party (the amount of damage is 9001)
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
Post Reply