lfnetwork.com mark read register faq members calendar

Thread: Lock Switch Script
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 07-13-2003, 07:31 PM   #1
JDKnite188
 
JDKnite188's Avatar
 
Join Date: Jan 2003
Location: Nar Shaddaa
Posts: 425
Lock Switch Script

I am planning on making a switch that locks a door switch. The script in other words makes the switch inactive when the switch was active, and vice-versa. How would I go about doing this?

My plan was lock switch entity targets "target_scriptrunner" which activates the script. What would be in the script?


Cheers,
JDKnite188

Hopin' LEC is going to get on track and bring us a decent JK for the JKers of 1997.
JDKnite188 is offline   you may: quote & reply,
Old 07-13-2003, 07:46 PM   #2
Emon
Strong Bad's Henchman
 
Emon's Avatar
 
Join Date: Jan 2002
Location: The Massassi Temple
Posts: 3,468
I told you exactly how to do it in your thread at Massassi. If you don't understand something, please tell me and I'll clarify it.

You want a button to unlock or lock a door, a toggle. Okay, so you'll need your lock button to target a target_scriptrunner.

Give the scriptrunner the following keys and values:

PARM1: LOCKED (or UNLOCKED if your door starts unlocked)
PARM2: Targetname of a target_activate which targets your door
Parm3: Targetname of a target_deactivate which targets your door.

Here's the script I would use:

//Generated by BehavEd

rem ( "Toggles an entity locked/unlocked through activation" );
rem ( "Checks the condition of locked/unlocked by reading what PARM1 is," );
rem ( "then sets PARM1 to LOCKED or UNLOCKED, and uses either PARM2 or PARM3," );
rem ( "which contain the targetnames of the target_activate and target_deactivate entities" );
rem ( "which target the lockable entity." );

if ( $get( STRING, "SET_PARM1") = "LOCKED"$ )
{
use ( $get( STRING, "SET_PARM2")$ );
set ( /*@SET_TYPES*/ "SET_PARM1", "UNLOCKED" );
}


else ( )
{
use ( $get( STRING, "SET_PARM3")$ );
set ( /*@SET_TYPES*/ "SET_PARM1", "LOCKED" );
}
Emon is offline   you may: quote & reply,
Old 07-14-2003, 01:03 AM   #3
JDKnite188
 
JDKnite188's Avatar
 
Join Date: Jan 2003
Location: Nar Shaddaa
Posts: 425
Emon is god

Thanks Emon! My plan was much more simple. The script would move the trigger_multiple out of reach of the player! Crude but easy! Too bad you beat me to a working plan and wasted 6 minutes on it.


Cheers,
JDKnite188

Hopin' LEC is going to get on track and bring us a decent JK for the JKers of 1997.
JDKnite188 is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > General Editing > Lock Switch Script

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:05 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.