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


From Creatures Wiki
Revision as of 02:53, 12 June 2020 by ScoobyGambit (talk | contribs) (→‎Example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

REPS is a CAOS command controlling flow.


REPS n (int) .. REPE

This creates a bounded loop. REPS opens the loop block and REPE closes it again. The loop block is repeated n times, and then execution continues at the point after REPE.


Output the factorial of va00:

SETV va01 1
REPS va00
  MULV va01 va00
  SUBV va00 1
OUTV va01

Create 5 seeds:

********Lets make a seed
reps 5
new: simp 2 3 1000 “tutorial_seed” 1 0 5000
attr 195
bhvr 48
elas 30
fric 50
accg 3
*create some underneath the garden
doif tmvt 1950 950 eq 1
mvto 1950 950
*if that doesn't work, create it at the agent creator for DS
setv va00 game “CreatorX”
setv va01 game “CreatorY”
mvsf va00 va01
emit 7 0.3
cmrt 0

See also[edit]