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

Difference between revisions of "NEW: SIMP"

From Creatures Wiki
Jump to navigation Jump to search
(c2e caos command)
 
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''NEW: SIMP''' is a [[CAOS]] command which creates an [[agent]].
+
'''NEW: SIMP''' is a [[CAOS]] command which creates a [[simple agent]].
  
 
==Usage==
 
==Usage==
 
Syntax: ''NEW: SIMP family (int) genus (int) species (int) imagefile (string) count (int) first (int) plane (int)''
 
Syntax: ''NEW: SIMP family (int) genus (int) species (int) imagefile (string) count (int) first (int) plane (int)''
  
Creates an agent of the [[classification system|class]] specified by the first three arguments, which uses [[sprite]]s from the file ''imagefile''[[.c16]] or [[.s16]] in the [[Images directory]]. The first sprite ([[POSE]] 0) will be at an offset of ''first'' from the start of the file, and ''count'' sprites on from this will be used. The agent will be at a [[plane]] of 0 to 9000 from the background.
+
Creates a simple [[agent]] of the [[classification system|class]] specified by the first three arguments, which uses [[sprite]]s from the file ''imagefile''[[.c16]] or [[.s16]] in the [[Images directory]]. The first sprite ([[POSE]] 0) will be at an offset of ''first'' from the start of the file, and ''count'' sprites on from this will be used. The agent will be at the specified [[plane]] - generally from 0 (furthest back) to 9000 (near the front).
  
 
The agent will use the scripts assigned to its class number. These are defined with [[SCRP]]..[[ENDM]] blocks.
 
The agent will use the scripts assigned to its class number. These are defined with [[SCRP]]..[[ENDM]] blocks.
 +
 +
If the coder sets the "first sprite used in the sprite file" to a non-0 number, that number is then considered as 0 for the [[ANIM]] and [[POSE]] commands as the base has shifted.
  
 
==Examples==
 
==Examples==
 +
From [[Making a Vendor for C3]]:
 +
Create new simple object with the classifier 2 23 10, using the sprite 'fishbowl'. Use 2 pictures from inside the 'fishbowl' sprite, and use those 2 pictures starting at position 0 in the file. Place the object in the 5000 image plane. 
 +
<pre>
 +
new: simp 2 23 10 "fishbowl" 2 0 5000
 +
</pre>
 +
 
See [[Inject Your First Object]].
 
See [[Inject Your First Object]].
 +
 +
Keep in mind when creating a [[vendor]] that NEW: blocks (such as creating the vended object) change the [[TARG]] to be the new object.[https://web.archive.org/web/20170814230544/http://www.gamewareeurope.com/GWDev/cdn/CDN_more.php?CDN_article_id=37]
  
 
==See also==
 
==See also==

Latest revision as of 23:29, 12 September 2022

NEW: SIMP is a CAOS command which creates a simple agent.

Usage[edit]

Syntax: NEW: SIMP family (int) genus (int) species (int) imagefile (string) count (int) first (int) plane (int)

Creates a simple agent of the class specified by the first three arguments, which uses sprites from the file imagefile.c16 or .s16 in the Images directory. The first sprite (POSE 0) will be at an offset of first from the start of the file, and count sprites on from this will be used. The agent will be at the specified plane - generally from 0 (furthest back) to 9000 (near the front).

The agent will use the scripts assigned to its class number. These are defined with SCRP..ENDM blocks.

If the coder sets the "first sprite used in the sprite file" to a non-0 number, that number is then considered as 0 for the ANIM and POSE commands as the base has shifted.

Examples[edit]

From Making a Vendor for C3: Create new simple object with the classifier 2 23 10, using the sprite 'fishbowl'. Use 2 pictures from inside the 'fishbowl' sprite, and use those 2 pictures starting at position 0 in the file. Place the object in the 5000 image plane.

new: simp 2 23 10 "fishbowl" 2 0 5000

See Inject Your First Object.

Keep in mind when creating a vendor that NEW: blocks (such as creating the vended object) change the TARG to be the new object.[1]

See also[edit]