This works perfectly if I have 2 or more heroes in the party. However, if I only have 1 hero, that single hero can reach 0 HP without causing a game over.
Code: Select all
plotscript, crest1, begin
map cure (31, 0)
map cure (31, 1)
map cure (31, 2)
map cure (31, 3)
variable (i, hpleft, someone alive)
someone alive := false
for (i, 0, 3) do (
hpleft:= get hero stat(i, stat:Hull, current stat)
if (hpleft>> 0) then (someone alive := true)
)
if (someone alive == false) then (
show text box (109)
wait for text box
show backdrop (0)
show textbox (235)
wait for text box
game over
)
show text box (110)
end
Code: Select all
plotscript, addbomber, begin
end
plotscript, addcarrier, begin
add hero (hero:carrier)
swap by position (0,1)
delete hero (hero:bomber)
end
plotscript, addfighter, begin
add hero (hero:fighter)
swap by position (0,1)
delete hero (hero:carrier)
end
add hero (hero:bomber)
swap by position (0,1)
delete hero (hero:bomber)
Therefore, it seems to have something to delete here command. Does anyone have any idea?