hermm
ok, first: no synthax error, or the editor didn't report them
then:
I have try to modify the code: if i have understand , it is the code for one item?
for 2 or more, i have to copy paste some lines?
in first time i have use the torch to test: all this code is in a lua script
and a plate activates it when activated
dont know if i put something wrong but it indicates "game completed" when i activate the plate, with the torch in one hand slot
since i had no idea of what it should done, i guess it works?
the code
Code: Select all
-- item torch
function partyHasItem(torch)
for champIdx=1,4 do
local champion = party:getChampion(champIdx);
for slot=1,31 do
local item = champion:getItem(slot);
if ( item ~= nil ) then
if ( item.name == torch ) then
return true;
end
if ( item:containedItems() ~= nil ) then
for subItem in item:containedItems() do
if ( subItem.name == torch ) then
return true;
end
end
end
end
end
end
return false;
end
-- Now define a single function that we can use to check for all of these items and then end the game if necessary.
function checkToorumTreasures()
if partyHasItem("torch") then
completeGame("mod_assets/cinematics/ending1.lua");
end
end
i didnt create a file "ending1.lua"
so it shows only "game completed!"
then i create the "ending1.lua"
i put this in the file (from your link "how to create cinematics")
Code: Select all
-- simple one image cinematic
enableUserInput()
startMusic("assets/samples/music/intro.ogg")
-- show the image
showImage("assets/textures/cinematic/intro/page01.tga")
fadeIn(2)
sleep(4)
fadeOut(4)
i have reload the editor and the mod, but that didn't shows the page01.tga after i activate the plate, it's always "game completed!"
did i do something wrong?
