Page 1 of 1
Health = 0
Posted: Tue Oct 07, 2014 4:10 am
by Maethalion
I have a script that sets the each champion's health to 0. They "die" but it's not game over.
Is this intentional? I WANT the champions to show 0 health and to have skull portraits. Something comes by and resurrects them (party:heal()) later.
Re: Health = 0
Posted: Fri Oct 10, 2014 5:55 pm
by SnowyOwl47
For this there is something you'd have to say like... GAME OVER lol but there is a way to do it. Its for some reasons that dungeon makers could use.
And it is not intentional really but thats how they made the game. They were not thinking about us players while doing it.
Now since i've never done this you'd have to ask someone else.
just to make sure you are using something like
Code: Select all
i = 1
for i => 4 then
party:getChampion(i)damage(1000, fire)
party:getChampion(i):playDamageSound()
i = i + 1
end
Or I think this might work,
Re: Health = 0
Posted: Sat Oct 11, 2014 11:58 pm
by SnowyOwl47
Sorry I messed up on something =D
It should be:
Code: Select all
i = 1
for i == 5 do
else
party:getChampion(i)damage(1000, fire)
party:getChampion(i):playDamageSound()
i = i + 1
end
Re: Health = 0
Posted: Sun Oct 12, 2014 2:56 pm
by JohnWordsworth
I think you might be looking for...
Code: Select all
for i=1,4 do
party:getChampion(i):damage(10000, "physical");
party:getChampion(i):playDamageSound();
end
Although, I'm not entirely sure of what the OP is asking. If you are looking to just kill all of the players (and end the game) then dealing a hideous amount of damage to them in turn like this will do that.
If you are specifically looking to have each hero show up as having "0" health but still have the game running (as you want a sequence where you play a ghost say) then you might be better off disabling the characters with setEnabled(false). I guess setting health to 0 is 'undefined behaviour' and while it's very unlikely that AH are going to go back and start updating LOG1 with changes to the scripting environment, it might be safer to just disable all 4 characters for that sequence of your dungeon (Although, I'm not 100% that disabling all characters is the best idea either!).
Re: Health = 0
Posted: Sun Oct 12, 2014 6:13 pm
by Dr.Disaster
From a gamers experience:
In several plays i sometimes had the occasion that after a hit a character's health was indeed shown as 0 looking at bar or char screen and he/she still alive. So it seems possible. Nevertheless health won't stay at 0 due to a characters usual health regeneration. Of course you can set the disease state to prevent this but that's visible.