|
Post by gabriele1969 on Apr 27, 2013 13:29:56 GMT
Hi there I am trying to penalize my player for touching a forbidden item. The idea being that teh score would go back to zero (or would decrease).
Is it possible to get that? how? i cannot figure this out...
|
|
|
Post by Jonathan Cauldwell on Apr 28, 2013 18:43:53 GMT
This is tricky. Make sure you save your work before you attempt this, and check the numbers carefully before you test it!
To reset the score in AGD 3.5 you need to insert this string of numbers at the appropriate point:
ASM 33 ASM 33 ASM 132 ASM 6 ASM 6 ASM 54 ASM 48 ASM 35 ASM 16 ASM 251
|
|
|
Post by gabriele1969 on Apr 28, 2013 18:55:27 GMT
good to know ...but what would be the right place?..
|
|
|
Post by Jonathan Cauldwell on Apr 28, 2013 19:10:48 GMT
In the relevant event. So if you're penalising the player for colliding with sprite type 4 (for example) you might put this in the code for that sprite type:
IF COLLISION 0 ASM 33 (et cetera) ENDIF
|
|
|
Post by gabriele1969 on Apr 28, 2013 20:02:47 GMT
uh of course..sorry stupid question ! BTW works like charm tnx!!
|
|
|
Post by Jonathan Cauldwell on Mar 23, 2014 11:51:18 GMT
To reset the score in AGD 4.5 you can do the following. As stated earlier, be VERY careful typing this:
ASM 33 ASM 149 ASM 134 ASM 6 ASM 6 ASM 54 ASM 48 ASM 35 ASM 16 ASM 251
|
|
|
Post by kas29 on May 8, 2017 12:34:20 GMT
Hi guys! How to reset scores in AGD 4.7?
|
|
|
Post by alessandro on May 8, 2017 18:21:28 GMT
Hi Alexey, the score location in AGD 4.7 starts from address 34495 on. The code provided by Jonathan should then be changed as follows:
ASM 33 ASM 191 ASM 134 ASM 6 ASM 6 ASM 54 ASM 48 ASM 35 ASM 16 ASM 251 or, in Assembly language:
LD HL,34495 LD B,6 RESET: LD (HL),48 INC HL DJNZ RESET
|
|
|
Post by kas29 on May 9, 2017 8:41:47 GMT
Hi Alessandro! Ah, here it is..) Thank you! Now I will try..)
|
|