I need some help for my new map.
I want this:
If I destroy a consol, a door will open.
What must I write in the LUA ?
Sorry for my bad english
Destroy consol, open door ?
Moderator: Moderators
- Alpha_07
- I got banned!

- Posts: 35
- Joined: Sun Jul 27, 2008 7:30 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Contact:
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Destroy consol, open door ?
You yourself can delete one of the cloned posts. You could also have edited your first post in this thread instead of double-posting.
And...I think it has to be in the LUA, yes. Take a peek at the Mustafar one.
Maybe you could combine OnEnterRegion with PlayAnimationFromTo or something like that.
EDIT - Wait.....OnEnterRegion makes no sense there....well, sneak a peek at Mustafar's LUA anyway.
And...I think it has to be in the LUA, yes. Take a peek at the Mustafar one.
Maybe you could combine OnEnterRegion with PlayAnimationFromTo or something like that.
EDIT - Wait.....OnEnterRegion makes no sense there....well, sneak a peek at Mustafar's LUA anyway.
-
YaNkFaN
- Field Commander

- Posts: 943
- Joined: Sat Dec 13, 2008 8:17 am
Re: Destroy consol, open door ?
here are the lines from kashyyyk
OnObjectKillName(PlayAnimDown, "gatepanel");
OnObjectRespawnName(PlayAnimUp, "gatepanel");
end
function PlayAnimDown()
PauseAnimation("thegateup");
RewindAnimation("thegatedown");
PlayAnimation("thegatedown");
ShowMessageText("level.kas2.objectives.gateopen",1)
ScriptCB_SndPlaySound("KAS_obj_13")
SetProperty("gatepanel", "MaxHealth", 2200)
-- SetProperty("gatepanel", "CurHealth", 50000)
-- PlayAnimation("gatepanel");
--SetProperty("gatepanel", "MaxHealth", 1e+37)
--SetProperty("gatepanel", "CurHealth", 1e+37)
-- Allowing AI to run under gate
UnblockPlanningGraphArcs("seawall1");
DisableBarriers("seawalldoor1");
DisableBarriers("vehicleblocker");
end
function PlayAnimUp()
PauseAnimation("thegatedown");
RewindAnimation("thegateup");
PlayAnimation("thegateup");
-- Allowing AI to run under gate
BlockPlanningGraphArcs("seawall1");
EnableBarriers("seawalldoor1");
EnableBarriers("vehicleblocker");
SetProperty("gatepanel", "MaxHealth", 1000)
SetProperty("gatepanel", "CurHealth", 1000)
end
hope this helps
OnObjectKillName(PlayAnimDown, "gatepanel");
OnObjectRespawnName(PlayAnimUp, "gatepanel");
end
function PlayAnimDown()
PauseAnimation("thegateup");
RewindAnimation("thegatedown");
PlayAnimation("thegatedown");
ShowMessageText("level.kas2.objectives.gateopen",1)
ScriptCB_SndPlaySound("KAS_obj_13")
SetProperty("gatepanel", "MaxHealth", 2200)
-- SetProperty("gatepanel", "CurHealth", 50000)
-- PlayAnimation("gatepanel");
--SetProperty("gatepanel", "MaxHealth", 1e+37)
--SetProperty("gatepanel", "CurHealth", 1e+37)
-- Allowing AI to run under gate
UnblockPlanningGraphArcs("seawall1");
DisableBarriers("seawalldoor1");
DisableBarriers("vehicleblocker");
end
function PlayAnimUp()
PauseAnimation("thegatedown");
RewindAnimation("thegateup");
PlayAnimation("thegateup");
-- Allowing AI to run under gate
BlockPlanningGraphArcs("seawall1");
EnableBarriers("seawalldoor1");
EnableBarriers("vehicleblocker");
SetProperty("gatepanel", "MaxHealth", 1000)
SetProperty("gatepanel", "CurHealth", 1000)
end
hope this helps
- Alpha_07
- I got banned!

- Posts: 35
- Joined: Sun Jul 27, 2008 7:30 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Contact:
Re: Destroy consol, open door ?
thank you
I'll try that
I'll try that
