Amos Professional Manual  Contents  Index

AMAL


WAIT
Wait

The Wait command freezes your AMAL program and executes an Autotest only.

Generating movement patterns
Elaborate movement patterns can be recorded directly into the AMAL memory bank, using the AMAL Editor. This superb accessory is fully detailed in Chapter 13.5. To create less ambitious movement patterns, AMAL loops can be used to great effect.

The simplest form of motion is a straight line, which is generated by a single For ... Next loop, like this:

E> Load "AMOSPro Tutorial:Objects/Sprites.abk" : Get Sprite Palette
   SP=4 : Sprite SP, 128,100,7
   C$="For R0=1 To 300; Let X=X+1 ; Next R0" Rem Move from left to right
   Amal SP,C$ : Amal On SP
   Direct

More complex movements can be created by including extra loops, as follows:

E> Load "AMOSPro Tutorial:Objects/Sprites.abk" : Get Sprite Palette
   SP=6 : Sprite SP,128,60,7
   C$="For R1=0 To 10 ;"
   C$=C$+"For R0=1 To 40; Let X=X+8 ; Next R0 ;" : Rem Move right
   C$=C$+"Let Y=Y+8 ;" : Rem Move down
   C$=C$+"For R0=1 To 40 ; Let X=X-8 ; Next R0 ;" : Rem Move left
   C$=C$+"Let Y=Y+8 ; Next R1": Rem Move down
   Amal SP,C$ : Amal On SP
   Direct

Playing a complex movement path
Migrating birds, car-assembly robots, sheep dogs and hostile aliens have one thing in common, they all seem to move in intelligent patterns. If you have ever envied the animated sequences featured in the latest video arcade game, your envy is at an end. AMAL allows you complete freedom to animate Objects through any sequence of movements imaginable.

PLAY
AMAL instruction: create a movement path

PL

ay path

The PLay command is used to play a movement pattern already defined and stored in the AMAL memory bank. These patterns are created from the AMAL Editor accessory, which records a sequence of mouse movements and enters them directly into the AMAL memory bank. Once patterns have been defined in this way, they can be assigned to any Object on the screen, and that Object will reproduce your original patterns perfectly. the AMAL Editor is fully explained in Chapter 13.5.

Back    Next
07.06.07