LOADING...

SCREECH

Vintage & Modern Tech Blog

<5 Min *AGD* BASIC #2 - Ice Slide

October 22, 2017

Let's start off by looking at how we can give our player character a slippery obstacle to avoid (or use wisely).

 

For this tutorial you will need to open up the snapshot

entitled GiftHuntTutorial0001.sna.

 

If you don't have it already, head to the Loading Screech Downloads page and click on <5 Min BASIC ZX which contains the snapshot.

 

Once you have opened up the snapshot navigate in AGD
to Events > Player control (type 0).

 

Now scroll down to the segment of code that says;

IF CUSTOM
  LET IMAGE = 7
  ANIMATE
  IF CANGODOWN
     SPRITEDOWN
     BEEP 25
     IF X > 159
        SCREENDOWN
        LET X = 52
        EXIT
     ENDIF
  ENDIF
ENDIF


Explanation/Refresher
What all of that means is;

"If the player sprite touches a
custom block, make the player look like image 7, animate the player sprite."

 

"If the player can go down without obstructions, move the
sprite down the screen and make a beeper sound."

 

"If the player goes past X 159 then move down to the next
screen, starting at X = 52" (AGD uses X for up down instead
of Y).

 

 

Exercises
1. Change SPRITEDOWN (not SCREENDOWN) to SPRITEUP.
   Run the program and see what happens.
2. Now change SPRITEDOWN to SPRITERIGHT and run
   the program again.
3. Change LET IMAGE = 7 to any other number
   e.g. LET IMAGE = 5.(as long as that number image exists).
 

 

Please reload

PLAY EXTENDED

  • YouTube Social  Icon

Custom Website Design and Content © 2014-2019 by Stephen Nichol. (Homepage theme in part inspired by 1992 issues of the computing magazine Your Sinclair). Articles, Captions, and Downloads by Stephen Nichol unless otherwise stated. Proudly created with Wix.com.

This site was designed with the
.com
website builder. Create your website today.
Start Now