home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
195.lha
/
Sample.Script
< prev
next >
Wrap
Text File
|
1988-12-27
|
3KB
|
89 lines
REM I put this short animation together to show people
REM what a Director script would look like.
REM As you can see, it is alot like BASIC.
REM You can use line numbers for GOTO or GOSUB
REM--------------------------------------------------------------
EXECUTE a,"ASSIGN mod: :options":REM This lets the program know where to
REM find the sound module.
MODULE "sound":REM LOAD MODULE
PRINT
PRINT " Sample Animation":REM THIS OUTPUT GOES TO CLI OR WINDOW
PRINT " by Don Bloomer"
SOUND V,"LOAD",1,":startrek":REM LOAD SOUND NUMBER ONE
SOUND V,"LOAD",2,":cycles.snd"
SOUND V,"LOAD",3,":ZZAP"
SETBLACK 1:REM MAKE SCREEN BLACK
LOAD 4,":TITLE.PIC":REM LOAD PICTURE INTO BUFFER NUMBER 4
SOUND V,"LOAD",4,":Spock.snd"
LOAD 3,":Enterprise.PIC"
POSITION 108,25:REM ADJUST FOR OVERSCAN PICTURE
DISPLAY 3:REM SHOW STAR SHIP ENTERPRISE
SETBLACK 0:REM TURN OFF BLACK SCREEN
NEW 1,3:REM MAKE A NEW BUFFER WITH SAME DIMENSIONS AS ENTERPRISE.PIC
COPY 3,1:REM AND SAME PALETTE, AND COPY PICTURE TO BUFFER 1.
DISPLAY 1
PAUSE 10:REM WAIT ONE SECOND
PEN 1,1:REM FOREGROUND PEN IS COLOR 1 (WHITE)
RECT 0,18,350,80:REM MAKE LARGE SOLID WHITE RECTANGLE
TRANSPARENT 1:REM TURN ON TRANSPARENT MODE SO COLOR 0 (BACKGROUND) IS
REM NOT TRANSFERRED WITH BLIT COMMANDS
BLIT 4,37,24,50,20,240,54:REM MOVE TITLE ON TO SCREEN
SOUND V,"PLAY",2,1,63:REM PLAY SOUND
PAUSE 10
FREE 4:REM GET RID OF BUFFER 4 (TO SAVE ON MEMORY USE)
PAUSE 15
SOUND V,"PLAY",2,1,63
DISPLAY 3:REM CHANGE DISPLAY SO TITLE DISAPPEARS
PAUSE 10
SOUND V,"PLAY",4,1,63:REM PLAY SPOCK'S VOICE
SOUND V,"FREE",2:REM FREE UP MORE CHIP MEMORY
NEW 2,3
COPY 3,2
BUFF = 2:REM SET UP VARIABLE
FOR D = 124 TO 240:REM MAKE LOOP
BLITDEST BUFF:REM MAKE BLIT COMMANDS GO TO BUFF
COPY 3,BUFF
BLIT 3,313,190,584 -(D*2),D,25,22:REM MOVE STAR
DISPLAY BUFF
BUFF = 3-BUFF:REM SWITCH TO OTHER BUFFER
NEXT
SOUND V,"FREE",4
NEW 4,3
PEN 1,0
MOVE 109,125
DRAW 1,200
SOUND V,"PLAY",3,1,63
FOR Z = 1 TO 2
PEN 1,11
MOVE 108,125
DRAW 0,200:REM DRAW PHASER SHOT
PAUSE 2
PEN 1,0
MOVE 108,125
DRAW 0,200:REM ERASE PHASER SHOT
PAUSE 1
NEXT
SOUND V,"PLAY",1,1,63:REM PLAY KIRK SOUND
PAUSE 20
FOR T = 0 TO 325 STEP 3
BLITDEST BUFF
COPY 3,BUFF
BLIT 4,0,88,0,88,325,80:REM COVER UP SHIP
BLIT 3,T,88,0,88,326-T,80:REM MOVE ENTERPRISE
DISPLAY BUFF
BUFF = 3-BUFF
NEXT
PAUSE 33
PRINT
PRINT
PRINT
REM If you have The Director from The Right Answers Group
REM you can change this any way you like. It would be possible
REM to make the Phaser shots respond to key presses of the
REM user. More sounds and pictures can be added. It wouldn't
REM be too hard to make the animation loop.
REM Have fun !
REM Don Bloomer
REM 1988