Editing GetLinkedRef

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
=='''Description'''==
=='''Description'''==


'''GetLinkedRef '''  gives the reference that is currently linked to the current reference. For example, if a switch opens a door, you can link the switch to the door and if the switch is activated you get the door reference and activate it. It is called on a reference and takes no parameters.
'''GetLinkedRef '''  Gives the reference that is currently linked to the current reference. For example, if a switch opens a door, you can link the switch to the door and if the switch is activated you get the door reference and activate it. It is called on a reference and takes no parameters.


=='''Syntax'''==
=='''Syntax'''==
Line 9: Line 9:
=='''Examples'''==
=='''Examples'''==


A simple, completed example of a switch script that uses '''GetLinkedRef''' is below.
SwitchRef.GetLinkedRef


The [[activator]] that will hold this script should have an [[Reference#Enable_Parent|enable parent]] added to it as its [[Reference#Linked_Ref|linked ref]].
=='''Notes'''==
*None at this time


<pre>scn SwitchScript
ref MyMarker
Begin OnActivate
Set MyMarker to GetLinkedRef
    if MyMarker.GetDisabled == 0 ;if marker is enabled...
        PlaySound OBJSwitchButtonB
        MyMarker.Disable
else
        PlaySound OBJSwitchButtonA
        MyMarker.Enable
endif
end</pre>


=='''See Also'''==


=='''See Also'''==
*[[Reference]]
*[[GetDisabled]]
*[[Disable]]
*[[Enable]]


=='''Reference'''==
None provided.
<!-- [[GetLinkedRef _Reference|List of functions that use GetLinkedRef ]]  (wiki) -->
<!-- [[GetLinkedRef _Reference|List of functions that use GetLinkedRef ]]  (wiki) -->


Please note that all contributions to the Fallout3 GECK Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see GECK:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)