Page 1 of 1

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

Posted: Fri Mar 06, 2015 11:41 pm
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?

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

Posted: Fri Mar 06, 2015 11:43 pm
by minmay
TileDamager is a component. This is explained at the top of the scripting reference under "Entities and Components".

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

Posted: Fri Mar 06, 2015 11:48 pm
by Zo Kath Ra
Search the asset pack for files that contain the word "TileDamager".
generic.lua --> floor_spike_trap

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

Posted: Sat Mar 07, 2015 12:05 am
by THOM
Ah - great. Thanks!

floor_spike_trap -tststs. Would have never come up to my mind...

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

Posted: Sat Mar 07, 2015 12:23 am
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)