Difference between revisions of "GetLinkedRef"

497 bytes added ,  03:13, 13 March 2017
m
Added completed script.
imported>Geckbot
m (Robot: Automated text replacement (-\[\[Category:(.*?)Functions\]\] +Category:\1Functions\nCategory:\1Functions (GECK 1.0)))
imported>Jokerine
m (Added completed script.)
 
(One intermediate revision by one other user not shown)
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'''==


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


=='''Notes'''==
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]].
*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) -->


[[Category:Functions]]
[[Category:Functions]]
[[Category:Functions (GECK 1.0)]]
[[Category:Functions (GECK 1.1)]]
[[Category:Condition Functions]]
[[Category:Condition Functions]]
[[Category:Condition Functions (GECK 1.0)]]
[[Category:Condition Functions (GECK 1.1)]]
[[Category:Reference Variable Functions]]
[[Category:Reference Variable Functions]]
[[Category:Reference Variable Functions (GECK 1.0)]]
[[Category:Reference Variable Functions (GECK 1.1)]]
Anonymous user