top of page

LOADING...

SCREECH

Vintage & Modern Tech Blog

Stephen Nichol

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


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).

36 views

Related Posts

See All
bottom of page