Difference between revisions of ".up"

From WikiManual
Jump to: navigation, search
m
m (Examples:)
Line 16: Line 16:
 
or
 
or
 
  10 1 [[store]]
 
  10 1 [[store]]
This puts 10 on the [[stack]].
+
#This puts 10 on the [[stack]].
Than it puts 1 on the stack.
+
#Than it puts 1 on the stack.
Than it stores 10 in memory location 1 of the bot ([[.up]]) and removes 1 and 10 from the stack.
+
#Than it stores 10 in memory location 1 of the bot ([[.up]]) and removes 1 and 10 from the stack.
The 10 in memory location 1 of the bot makes accelerates him +10 forward if he has not reached the maximum acceleration in that direction.
+
:The 10 in memory location 1 of the bot makes accelerates him +10 forward if he has not reached the maximum acceleration in that direction.
  
 
  cond
 
  cond

Revision as of 14:48, 23 December 2005

.up (1) is a movement Sysvar.

Without these, there could be no movement, just bouncing, gliding, flowing and tie-pushing.

Sysvars:

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

Syntax:

  • .up accelerates the robot forward in the direction that he is facing.

Examples:

10 .up store

or

10 1 store
  1. This puts 10 on the stack.
  2. Than it puts 1 on the stack.
  3. Than it stores 10 in memory location 1 of the bot (.up) and removes 1 and 10 from the stack.
The 10 in memory location 1 of the bot makes accelerates him +10 forward if he has not reached the maximum acceleration in that direction.
cond
start
10 .up store
stop

A robot with this gene would constantly accelerate forward at a rate of 10 per turn. That is to say that his forward velocity would increase by a value of 10. If he 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 incluging tie and other propulsion vectors, then the vector gets cut to a lenght of 40 as maximum aceleration.

More details at Movement.