|
Post by Minilop on Mar 29, 2021 9:30:33 GMT
Hi Jonathan
I'm writing a game using Adventure mode, I couple of things strike me as being really useful if they were available: 1) Make collectable blocks stay collected (when a collectable is collected replace it with BLOCK 0, so that on screen refresh the collectable is no longer there) 2) The ability to access a Block number in code - thereby allowing different types of collectable, so in the collect block script I could write something like: IF COLLECTEDBLOCK = 5 SCORE 50 ELSE IF COLLECTEDBLOCK = 200 ADD 1 TO LIVES ENDIF
...or any workarounds to the above!
|
|
|
Post by jltursan on Mar 29, 2021 13:30:24 GMT
This is what I've called the "Pacman mode" in the last MSX release, collectables work like the dots in a Pacman game  About your second question, couldn't custom blocks used instead? (disclaimer: I'm not an AGD expert at all...)
|
|
|
Post by rockandroll on Jan 15, 2022 14:10:24 GMT
Those two things would be extremely valuable, I've had exactly the same issue. Did you finally find any workaround? I decided to go with Objects instead of Blocks, but it doesn't seem to be the best solution.
|
|
|
Post by oss003 on Jan 16, 2022 12:20:11 GMT
There is a work around for question 1) with Adventuremode
EVENT COLLECTBLOCK
; Calculate pos txtpos
LET I X LET J Y DIVIDE I BY 8 DIVIDE J BY 8 ADD 1 TO J IF DIRECTION RIGHT ADD 2 TO I ENDIF
; Print empty block
AT J,I PUTBLOCK 0
Question 2) is more diffficult because the blocktypes are stored in the map, not the block numbers .....
|
|
|
Post by rockandroll on Jan 19, 2022 16:01:26 GMT
There is a work around for question 1) with Adventuremode EVENT COLLECTBLOCK
; Calculate pos txtpos
LET I X LET J Y DIVIDE I BY 8 DIVIDE J BY 8 ADD 1 TO J IF DIRECTION RIGHT ADD 2 TO I ENDIF
; Print empty block
AT J,I PUTBLOCK 0 Question 2) is more diffficult because the blocktypes are stored in the map, not the block numbers ..... Thanks a lot!
|
|
|
Post by oss003 on Jan 24, 2022 19:14:29 GMT
Maybe this is a way for detecting more blocktypes ...
First define a new blocktype with eg type 9: DEFINEBLOCK 9,255,255,255,255,255,255,255,255,4 Use this file as USER.ASM or point to this routine in v0.7.10:
; Checks for blocktype called by USER ; USER 9 checks for blocktype 9
user ld b,a call tded ld (varblk),a ret
In the PLAYER event, you have to add this code:
... USER 9 IF BLOCK 9 ;Hit blocktype 9 ENDIF ... You can define more blocktypes and test for hitting them with USER x
|
|
|
Post by rockandroll on Jan 30, 2022 20:24:55 GMT
Thank you, I'll give it a try
|
|