How can I lock doors in an space map?

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
DaviidHL
Private Third Class
Posts: 52
Joined: Thu Apr 05, 2018 11:48 am
Projects :: Kashyyyk Droid Invasion
Games I'm Playing :: SWBF2
xbox live or psn: DaviidHL_

How can I lock doors in an space map?

Post by DaviidHL »

How can I lock doors and play his sound in an space map?
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How can I lock doors in an space map?

Post by Marth8880 »

To lock a door via script, you'd put this at the appropriate objective if it's a campaign or at the bottom of ScriptPostLoad if not:

Code: Select all

SetProperty("objectName", "IsLocked", "1")
(make sure you change "objectName" to the name of the object ;) )


When would you want the hissing sound to play? If you want it to play at the door's location when the player approaches the door's interaction radius, you can do so by specifying a LockedSound in the door's ODF:

Code: Select all

LockedSound     = "name_of_sound_property"
(make sure you change "name_of_sound_property" to the name of the sound property that should be played ;) )
Post Reply