Destroy consol, open door ?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Alpha_07
I got banned!
I got banned!
Posts: 35
Joined: Sun Jul 27, 2008 7:30 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Destroy consol, open door ?

Post by Alpha_07 »

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
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Destroy consol, open door ?

Post by Fiodis »

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.
YaNkFaN
Field Commander
Field Commander
Posts: 943
Joined: Sat Dec 13, 2008 8:17 am

Re: Destroy consol, open door ?

Post by YaNkFaN »

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
User avatar
Alpha_07
I got banned!
I got banned!
Posts: 35
Joined: Sun Jul 27, 2008 7:30 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Destroy consol, open door ?

Post by Alpha_07 »

thank you

I'll try that
Post Reply