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

Private Third Class
User avatar
Posts: 50
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?

Postby DaviidHL » Wed Jun 20, 2018 11:31 am

How can I lock doors and play his sound in an space map?

Resistance Leader
User avatar
Posts: 5177
Joined: Tue Feb 09, 2010 8:43 pm
Location: Edinburgh, UK
Projects :: EVERYWHERE + Zero Munge + TCW
Games I'm Playing :: Day of Defeat Source
xbox live or psn: Marth8880

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

Postby Marth8880 » Wed Jun 20, 2018 6:15 pm

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 ;) )

Return to SWBF2 Modding

Who is online

Users browsing this forum: No registered users and 2 guests