PDA

View Full Version : Script to Open Doors


harIII
02-13-2009, 09:50 AM
I need a script to open a door once you have Bastilaís Lightsaber. I canít get mine to work, Iím not sure Iím even putting the condition in the right spot. Can somebody give me a script please. Also if it is important, Bastilaís Lightsaber tag or template is ďg_w_dblsbr006.Ē

Star Admiral
02-13-2009, 12:47 PM
I need a script to open a door once you have Bastila’s Lightsaber. I can’t get mine to work, I’m not sure I’m even putting the condition in the right spot. Can somebody give me a script please. Also if it is important, Bastila’s Lightsaber tag or template is “g_w_dblsbr006.”

A general version of that script would be something like the following. Posting your version might help us figure something out.

void main() {
if( GetItemPossessedBy( GetFirstPC(), "g_w_dblsbr006" ) != OBJECT_INVALID ) {
object oDoor = GetObjectByTag( "doortag", 0 );
ActionUnlockObject( oDoor );
ActionOpenDoor( oDoor );
}
}

- Star Admiral

harIII
02-17-2009, 09:43 AM
Thanks and I'll try to continue to post my scripts in the future.