Page 1 of 2

Instakill party whens step on floor_trigger

Posted: Sat Nov 15, 2014 11:57 pm
by KhellQc
Hey guys, I have no clue how to do that. I just want the 4 party member to die when stepping somewhere. that it.... cant figure it ... I searched forums and they give me returns me an error argument 6 stating it needs numbers.... wtv can you hel

Re: Instakill party whens step on floor_trigger

Posted: Sun Nov 16, 2014 12:00 am
by cromcrom
Try this function, that you can connect to a floortrigger:

Code: Select all

function killparty()
for i=1,4 do
party.party:getChampion(i):setHealth(0)
end
end

Re: Instakill party whens step on floor_trigger

Posted: Sun Nov 16, 2014 12:03 am
by KhellQc
Nothing happening, and if you meant


for i=1,4 do I tried to fix it to <id> but still not working

Well it kills them but they still walk as deads.. does give the game over msg and try to end game

Re: Instakill party whens step on floor_trigger

Posted: Sun Nov 16, 2014 1:00 am
by GoldenShadowGS
Did you try in the editor or the actual game?

Re: Instakill party whens step on floor_trigger

Posted: Sun Nov 16, 2014 4:35 am
by KhellQc
just did and it puts them as dead, like skeleton but I can still walk around

Re: Instakill party whens step on floor_trigger

Posted: Sun Nov 16, 2014 4:37 am
by minmay
You should use Champion:damage() instead of Champion:setHealth().

Re: Instakill party whens step on floor_trigger

Posted: Sun Nov 16, 2014 6:54 am
by KhellQc
bad argument num,ber 2 string expected got nil

function killparty()
for i=1,4 do
party.party:getChampion(i):damage(9999)
end
end

Re: Instakill party whens step on floor_trigger

Posted: Sun Nov 16, 2014 7:18 am
by sps999
I think this video might help. In the video Skuggs covers how to use scripts to interact with the dungeon.

Watch it here: https://www.youtube.com/watch?v=dxonfso ... Nc&index=6

And it might help to watch the previous videos in the series too if you are still lost. The series is a pretty good introduction to the editor.

Re: Instakill party whens step on floor_trigger

Posted: Sun Nov 16, 2014 7:42 am
by KhellQc
sure will do Thank you

Re: Instakill party whens step on floor_trigger

Posted: Sun Nov 16, 2014 8:46 am
by minmay
KhellQc wrote:bad argument num,ber 2 string expected got nil

function killparty()
for i=1,4 do
party.party:getChampion(i):damage(9999)
end
end
http://www.grimrock.net/modding/scripti ... /#Champion
Champion:damage(dmg, damageType)
You need to include a damage type, like "party.party:getChampion(i):damage(9999,"physical")".