Difference between revisions of "Template:Movementarticles"

From WikiManual
Jump to: navigation, search
m (Syntax:: almost)
m
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<!-- this template is used by all 4 movement articles. "sysvar" is the name of the sysvar , "num" is its number and "dir" a text describing the direction-->
 
<!-- this template is used by all 4 movement articles. "sysvar" is the name of the sysvar , "num" is its number and "dir" a text describing the direction-->
  
[[{{{sysvar}}}]] ({{{num}}}) is a [[movement]] [[Sysvar]].
+
__notoc__
 
+
{| align="right"
Without these, there could be no movement, just bouncing, gliding, flowing and tie-pushing.
+
|-
 
+
|{{movement}}
 +
|}
 
==[[Sysvar]]s:==
 
==[[Sysvar]]s:==
  
{{movement}}
+
{{v221}} {{{num}}} [[{{{sysvar}}}]] is a [[movement]] [[Sysvar]]. Without these, there could be no movement, just bouncing, gliding, flowing and tie-pushing.
  
 
==Syntax:==
 
==Syntax:==
  
*[[{{{sysvar}}}]] accelerates the robot {{{dir}}} of the direction he is facing.
+
*[[{{{sysvar}}}]] accelerates the robot {{{dir}}}. It uses memory location {{{num}}} of the bot to store how much it accelerates in that direction.
  
 
==Examples:==
 
==Examples:==
Line 20: Line 21:
 
This puts 10 on the [[stack]].
 
This puts 10 on the [[stack]].
 
Than it puts {{{num}}} on the stack.
 
Than it puts {{{num}}} on the stack.
Than it stores 10 in memory location {{{num}}} of the bot ([[.sx]]) and removes {{{num}}} and 10 from the stack.
+
Than it stores 10 in memory location {{{num}}} of the bot ([[{{{sysvar}}}]]) and removes {{{num}}} and 10 from the stack.
The 10 in memory location {{{num}}} of the bot makes accelerates him +10 sideways to the left if he has not reached the maximum acceleration in that direction.
+
The 10 in memory location {{{num}}} of the bot accelerates it +10 {{{dir}}} if it has not reached the maximum acceleration in that direction.
  
 
  cond
 
  cond
Line 28: Line 29:
 
  stop
 
  stop
  
A robot with this gene would constantly accelerate {{{dir}}} at a rate of 10 per turn. That is to say that his velocity in that direction would increase by a value of 10. If he should rotate then the direction in which the acceleration takes place would also change.
+
A robot with this gene would constantly accelerate {{{dir}}} at a rate of 10 per turn. That is to say that his velocity in that direction would increase by a value of 10. If it should rotate then the direction in which the acceleration takes place would also change.
  
 
==Technical Details:==
 
==Technical Details:==
Movement values get cut above 1000 and below -1000, then added up to a single vector incluging tie and other propulsion vectors, then the vector gets cut to a lenght of 40 as maximum aceleration.
+
Movement values get cut above 1000 and below -1000, then added up to a single vector including tie and other propulsion vectors, then the vector gets cut to a length of 40 as maximum aceleration.
  
 
More details at [[movement#Technical Details:|Movement]].
 
More details at [[movement#Technical Details:|Movement]].

Latest revision as of 08:25, 1 February 2006


Movement:

.aimsx 6 .aimdx 5
.up 1
.sx 3 Veggietransparent.gif .dx 4
.dn 2
.aim 18 .setaim 19
.maxvel 11
.setboy 314 .rdboy 315

Forwards compatibility note:

aimdx is the old name for aimright

aimsx is the old name for aimleft

Sysvars:

V221.gif {{{num}}} [[{{{sysvar}}}]] is a movement Sysvar. Without these, there could be no movement, just bouncing, gliding, flowing and tie-pushing.

Syntax:

  • [[{{{sysvar}}}]] accelerates the robot {{{dir}}}. It uses memory location {{{num}}} of the bot to store how much it accelerates in that direction.

Examples:

10 [[{{{sysvar}}}]] store

or

10 {{{num}}} store

This puts 10 on the stack. Than it puts {{{num}}} on the stack. Than it stores 10 in memory location {{{num}}} of the bot ([[{{{sysvar}}}]]) and removes {{{num}}} and 10 from the stack. The 10 in memory location {{{num}}} of the bot accelerates it +10 {{{dir}}} if it has not reached the maximum acceleration in that direction.

cond
start
10 [[{{{sysvar}}}]] store
stop

A robot with this gene would constantly accelerate {{{dir}}} at a rate of 10 per turn. That is to say that his velocity in that direction would increase by a value of 10. If it should rotate then the direction in which the acceleration takes place would also change.

Technical Details:

Movement values get cut above 1000 and below -1000, then added up to a single vector including tie and other propulsion vectors, then the vector gets cut to a length of 40 as maximum aceleration.

More details at Movement.