Difference between revisions of "LTargetID"

From Wiki
Jump to: navigation, search
 
Line 4: Line 4:
 
=== Description ===
 
=== Description ===
 
{{rw}}
 
{{rw}}
 +
 +
The #lTargetID system variable determines the id of the last target used. You can also write to this variable and use it in conjuction with "event Macro 22" (LastTarget), which will target the object as if it was clicked with the mouse.
 +
 +
'''NOTE:'''
 +
* #lTargetKind must be set to 1 for event Macro 22 to use the target id.
  
 
==== Example ====
 
==== Example ====
 
<pre>
 
<pre>
 +
; use the dagger
 +
set #lObjectID %dagger
 +
event Macro 17
  
 +
; wait for target cursor
 +
target 5s
  
 +
; carve the hides from the corpse
 +
set #lTargetID %cowCorpse
 +
set #lTargetKind 1 ; make sure it targets an object
 +
event Macro 22
 +
...
 
</pre>
 
</pre>
 
==== See Also ====
 
==== See Also ====
 
{|
 
{|
| Width=200px |  
+
| Width=200px | [[Var lTargetID|#lTargetID]] || Width=200px | [[Var lTargetX|#lTargetX]] || Width=200px | [[Var lTargetY|#lTargetY]] || Width=200px | [[Var lTargetZ|#lTargetZ]] || Width=200px | [[Var lTargetKind|#lTargetKind]]
 
|}
 
|}
 
----
 
----

Revision as of 09:15, 18 August 2005

#lTargetID

Last Action System Variables

Description

The #lTargetID system variable determines the id of the last target used. You can also write to this variable and use it in conjuction with "event Macro 22" (LastTarget), which will target the object as if it was clicked with the mouse.

NOTE:

  • #lTargetKind must be set to 1 for event Macro 22 to use the target id.

Example

; use the dagger
set #lObjectID %dagger
event Macro 17

; wait for target cursor
target 5s

; carve the hides from the corpse
set #lTargetID %cowCorpse
set #lTargetKind 1 ; make sure it targets an object
event Macro 22
...

See Also

#lTargetID #lTargetX #lTargetY #lTargetZ #lTargetKind

Main_Page Documentation Last Action System Variables