View Single Post
Old 09 June 2016, 12:16   #23
Brick Nash
Registered User

Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 211
Quote:
Originally Posted by volvo_0ne View Post
Code:
Screen Open 0,320,200,32,Lowres
Flash Off : Curs Off : Cls 0
Double Buffer 

AM$="A: Let R0=J1; If R0=1 Jump C; If R0=2 Jump D; "
AM$=AM$+"If R0=4 Jump E; If R0=8 Jump F; Pause; Jump A; "
AM$=AM$+"C: Let Y=Y-1; Pause; Jump A; " : Rem UP 
AM$=AM$+"D: Let Y=Y+1; Pause; Jump A; " : Rem DOWN 
AM$=AM$+"E: Let X=X-1; Pause; Jump A; " : Rem LEFT 
AM$=AM$+"F: Let X=X+1; Pause; Jump A; " : Rem RIGHT

Bob 1,160,100,1 : Rem Place the bob near centre of screen


Channel 1 To Bob 1
Amal 1,AM$
Amal On 1
Wait Key
Try this for an AMAL Joystick test routine, It's very basic (well AMAL actually)
but it can easily be expanded on.

It also works in DIRECT mode

You must have at least 1 BOB in the bob bank (pref 32x32 Pixels but not important.)

Hope this gives you some ideas.

V1

PS: The CASE of the lettering in the strings is VERY IMPORTANT.....
Excellent thanks I'll give it a try, it's just what I've been looking for. My joystick routine is a bit clunky right now as shifting from a horizontal or vertical to a diagonal doesn't work that well so I was planning on re-writing it anyway.

Oh and for anyone else who may read this in the future I solved my bob sync problem.

Turns out it was just a case of writing - Bob 2,X Bob(1),Y Bob(1),8 and that made Bob 2 appear at Bob 1's co-ordinates nicely!
Brick Nash is offline  
 
Page generated in 0.04288 seconds with 11 queries