|
Post by xavisan on Mar 6, 2023 22:55:17 GMT
One question, ramon I have tried the FX theme using the ayfxdit.exe tool, and generating the "sfxBank.afb" file, I find a problem, I have added 4 FX, if I perform a SOUND 102, or SOUND 103 or SOUND 104, the game restarts when i use the trigger function, SOUND x is added inside that routine. The funny thing is that with the same code elsewhere, it seems to work and not fail, any thoughts on that. Thx!
|
|
|
Post by ramon on Mar 6, 2023 23:03:41 GMT
Try placing a trigger delay:
IF KEY FIRE
IF F = 0
LET F = 1
;BEEP 30
ENDIF
ELSE
LET F = 0
ENDIF
|
|
|
Post by xavisan on Mar 6, 2023 23:57:17 GMT
Not works, this does not make the Play of the FX, with SOUND 103 play this sound but the game is restarted, but is necessary inicitalize any value ??, I not use a beeper configuration, I use this option,2 = ZX Spectrum 128/+2/+3 AY-3-8912 Musicizer. Example to my code: ------ IF KEY FIRE .... ANIMATE VERYSLOW ; BEEP 40 ; sonido disparo player ; si pongo SOUND 102 reproduce sonido, pero se resetea IF F = 0 LET F = 2 ENDIF ADD 1 TO I IF SETTINGB = 0 ..... ENDIF LET SETTINGB = 1 ELSE LET SETTINGB = 0 LET H = 0 ; control de disparo LET F = 0 ENDIF The play of an FX is finally used with the variable F ? I use this tutorial, is it outdated? pacmanzxspectrum.blogspot.com/2021/01/el-chip-prodigioso.htmlThx!!!
|
|
|
Post by ramon on Mar 7, 2023 14:10:54 GMT
Try moving the SOUND 10x line of code lower or higher within your IF FIRE condition.
TRY THIS TOO:
LET A = 100
ADD F TO A
SOUND A ; play effect (100+F)
Use Samples that do not occupy more than 40 positions (up to position 3F) as a measure to optimize and be able to export to Arkos Tracker in the future.
I have tried to break a game with your indications and I do not find the error. I don't know what could be happening to you. Make sure you have the latest version of Mod Sound. But I think everything works fine for you. I don't know.
|
|
|
Post by xavisan on Mar 7, 2023 20:59:31 GMT
I'll try what you suggest ramon and tell you Thx!!!
|
|
|
Post by xavisan on Mar 7, 2023 21:07:16 GMT
Hi ramonI got to see the error, it shows NUMBER TO LONG 80:1 and reboots. Is 80:1 really weird ... mmmmm... but is not more real really. It could be that there was a bug, but I don't know exactly from where, I have generated the file sfxBank.afb again but this time with your .WAV files and it restarts, using SOUND 100 + F, being for example LET F = 8, 1 or 2 or 3... it does not play anything if your using the LET F definition in GAMEINIT file (events.a13) and if your add this LET Function in the FIRE the Game to press the FIRE key the game it slows down tremendously, but doesn't play sound. if I put the SOUND 106 for example directly it restarts.
|
|