ive had a look at google but cant find anything. i know it was possible on the zx spectrum but difficult. any ideas?
thanks for all your help btw
Yes, use TAG to enable "Text at Graphics Cursor" mode and then MOVE to move the graphics cursor to the relevant pixel position.
Keep in mind that it's slower than the normal PRINT command.
Btw: Locomotive BASIC is quite powerful but you will not find a lot of great examples with Google unfortunately. I would strongly suggest to read the Amstrad CPCs manual to get an overview of all its commands. It's really a great resource.
https://www.cpcwiki.eu/manuals/AmstradCPC6128-hypertext-en-Sinewalker.pdf
This is a modified example from the CPC6128 manual, to explain interruptions (DI command), but now (besides works in 464), moves a little sprite to the pixel. Hope it help you.
10 MODE 1:TAG
20 EVERY 50 GOSUB 140
30 x1=RND*320: x2=RND*320
40 y=200+RND*200
50 FOR x=320-x1 TO 320+x2 STEP 1
60 DI:'*** disable IRQs to print char
70 MOVE x,y
80 c$=CHR$(ROUND(RND(251)+248))
90 PRINT " ";c$;
100 CALL &BD19:'MC WAIT FLYBACK
110 EI:'*** enable IRQs
120 NEXT
130 GOTO 30
140 '******* sub print shoot
150 MOVE 320,0
160 DRAW x+8,y-16
170 RETURN
deleted
Quote from: andycadley on Yesterday at 17:57Yes, use TAG to enable "Text at Graphics Cursor" mode and then MOVE to move the graphics cursor to the relevant pixel position.
this works but it leaves a couple of weird characters next to it
Quote from: the777 on Yesterday at 19:05this works but it leaves a couple of weird characters next to it
add a semicolon at the end of the print statement
10 TAG
20 MOVE 325,202
30 PRINT "x";
Quote from: eto on Yesterday at 19:17Quote from: the777 on Yesterday at 19:05this works but it leaves a couple of weird characters next to it
add a semicolon at the end of the print statement
10 TAG
20 MOVE 325,202
30 PRI
i did, it still does it
https://postimg.cc/YvMQVqWf/56eb58d0
https://postimg.cc/WFzLTkdG/e93e9dd3
even if i use print "A"; at line 260
i think it may have something to do with the inkey command because depending on what 1 or 2 arrow key(s) i press, it changes the amount of characters
Because line 280 is doing PRINT INKEY(0) without a semicolon, so it is printing new line characters (because TAG mode always prints the character)
@the777 - Will be little bit faster if you put more command in 1 line, for example:
250 MOVE x,y:TAG:?CHR$(255); <- to print as sprite after TAG
280 TAGOFF:? INKEY(0) <- to print as sign after TAGOFF
or
280 PRINT INKEY(0); <- if you want one more sign as sprite, but sign ; is nesesery to disappeare arrows.
I also recommend increasing number of pixels by which sprite moves to speed up its movement.
i.e. x=x+2 and y=y-2 etc. instead of x=x+1 and y=y-1 etc. or even try 4 instead of 2.
If you don't want sprite to leave a trail, you need to delete it in its old position before displaying it in new one. Unfortunately, a side effect is that sprite blinks.
Download this DSK below, and try GUI.BAS with sprite arrow pointer 100% Basic.
Or GUI2.BAS if you don't have joystick (move pointer by F1,F2,F3,F5).
Pretty fast for Basic, is it? :)