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?
How to do damage to the party on a certain tile?
Re: How to do damage to the party on a certain tile?
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.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
- 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?
Search the asset pack for files that contain the word "TileDamager".
generic.lua --> floor_spike_trap
generic.lua --> floor_spike_trap
Re: How to do damage to the party on a certain tile?
Ah - great. Thanks!
floor_spike_trap -tststs. Would have never come up to my mind...
floor_spike_trap -tststs. Would have never come up to my mind...
Re: How to do damage to the party on a certain tile?
you can use:
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)
Code: Select all
damageTile(party.level, party.x, party.y, party.facing, party.elevation, 128, "physical", 9001