Welcome to the Creatures Wiki! Log in and join the community.

Difference between revisions of "TARG"

From Creatures Wiki
Jump to navigation Jump to search
 
(8 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
The target agent in agent scripts defaults to the agent in question (ie, [[OWNR]]), while there is no default target agent in install or removal scripts (ie, it is [[NULL]]).
 
The target agent in agent scripts defaults to the agent in question (ie, [[OWNR]]), while there is no default target agent in install or removal scripts (ie, it is [[NULL]]).
  
The '''TARG''' variable is accessed or modified via CAOS commands:
+
The '''TARG''' variable is accessed or modified via the following:
  
 
==Usage==
 
==Usage==
 +
 +
===Command===
 
Syntax: ''TARG target (agent)''
 
Syntax: ''TARG target (agent)''
  
 
This sets the target of the current script.
 
This sets the target of the current script.
  
 +
===Function===
 
Syntax: ''TARG''
 
Syntax: ''TARG''
  
 
This returns the target as an agent.
 
This returns the target as an agent.
 +
 +
{{needexamples}}
  
 
==See also==
 
==See also==
 
* [[RTAR]] sets TARG randomly.
 
* [[RTAR]] sets TARG randomly.
 
* [[ENUM]] sets TARG sequentially.
 
* [[ENUM]] sets TARG sequentially.
 +
* [[STAR]] sets TARG randomly within agents of a certain [[classifier]] which can be seen by the current agent.
 +
* [[TTAR]] sets TARG randomly within agents of a certain classifier which are being touched by the current agent.
 +
* [[FROM]]
 +
* [[NORN]]
 +
* [[PNTR]]
 +
* [[IT|_IT_]]
 +
* [[CARR]]
 +
 +
==External links==
 +
*[https://web.archive.org/web/20170814230544/http://www.gamewareeurope.com/GWDev/cdn/CDN_more.php?CDN_article_id=37 The TARG Object] at the [[CDN]].
 +
*[https://web.archive.org/web/20050312122959/http://www.freewebs.com/alimaggs/creaturesdev/cdn/c3/knowledgebase/c3_errors.html Common Errors] at an archive of the CDN, including "invalid targ".
  
 
[[Category:CAOS]]
 
[[Category:CAOS]]
{{stub}}
+
[[Category:C1 CAOS Commands]]
 +
[[Category:C2 CAOS Commands]]
 +
[[Category:C3 CAOS Commands]]

Latest revision as of 22:11, 19 April 2022

TARG is a concept used by CAOS. Each running script has its own target variable, which represents the agent on which most CAOS commands act.

The target agent in agent scripts defaults to the agent in question (ie, OWNR), while there is no default target agent in install or removal scripts (ie, it is NULL).

The TARG variable is accessed or modified via the following:

Usage[edit]

Command[edit]

Syntax: TARG target (agent)

This sets the target of the current script.

Function[edit]

Syntax: TARG

This returns the target as an agent.

Editnorn.png This article about a CAOS command or function needs further examples.

See also[edit]

  • RTAR sets TARG randomly.
  • ENUM sets TARG sequentially.
  • STAR sets TARG randomly within agents of a certain classifier which can be seen by the current agent.
  • TTAR sets TARG randomly within agents of a certain classifier which are being touched by the current agent.
  • FROM
  • NORN
  • PNTR
  • _IT_
  • CARR

External links[edit]