I need script help please
Posted: Tue Aug 29, 2006 2:40 am
Code: Select all
EnableSPHeroRules()
BlockPlanningGraphArcs("door1_con")
SetProperty("gatepanel", "MaxHealth", 1000)
SetProperty("gatepanel", "CurHealth", 1000)
SetProperty("gate", "MaxHealth", 12000)
SetProperty("gate", "CurHealth", 12000)
OnObjectKillName(PlayAnimDown, "gatepanel");
OnObjectRespawnName(PlayAnimUp, "gatepanel");
OnObjectRespawnName(PlayAnimUp, "gate");
OnObjectKillName(PlayAnimDown1, "gate");
end
gate = 1
function PlayAnimDown()
PauseAnimation("thegateup");
RewindAnimation("thegatedown");
PlayAnimation("thegatedown");
--ShowMessageText("level.kas2.objectives.gateopen",1)
--ScriptCB_SndPlaySound("KAS_obj_13")
SetProperty("gatepanel", "MaxHealth", 1200)
UnblockPlanningGraphArcs("door1_con");
DisableBarriers("door1");
end
function PlayAnimDown1()
PauseAnimation("thegateup");
RewindAnimation("thegatedown11");
PlayAnimation("thegatedown11");
SetProperty("gatepanel", "MaxHealth", 5000)
KillObject("gatepanel")
gate = 0
--ShowMessageText("level.kas2.objectives.gateopen",1)
UnblockPlanningGraphArcs("door1_con");
DisableBarriers("door1");
end
function PlayAnimUp()
if gate == 1 then
PauseAnimation("thegatedown");
RewindAnimation("thegateup");
PlayAnimation("thegateup");
SetProperty("gatepanel", "MaxHealth", 1000)
SetProperty("gatepanel", "CurHealth", 1000)
SetProperty("gate", "MaxHealth", 12000)
BlockPlanningGraphArcs("door1_con");
EnableBarriers("door1");
else
RespawnObject("gate")
PauseAnimation("thegatedown");
RewindAnimation("thegateup");
PlayAnimation("thegateup");
SetProperty("gatepanel", "MaxHealth", 1000)
SetProperty("gatepanel", "CurHealth", 1000)
SetProperty("gate", "MaxHealth", 12000)
BlockPlanningGraphArcs("door1_con");
EnableBarriers("door1");
end
Here is the lua. log
Code: Select all
D:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\FI1\FI1g_con.lua:278: `end' expected (to close `function' at line 77) near `<eof>'
ERROR[scriptmunge scripts\FI1\FI1g_con.lua]:Could not read input file.ERROR[scriptmunge scripts\FI1\FI1g_con.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings
ERROR[levelpack mission\FI1g_con.req]:Expecting bracket, but none was found.
File : munged\pc\fi1g_con.script.req(1)...
ucft <--
ERROR[levelpack mission\FI1g_con.req]:Expecting bracket, but none was found.
File : munged\pc\fi1g_con.script.req(1)...
ucft <--
2 Errors 0 Warnings