A few quick questions, mostly for sound.
[1] Can you play a SFX and have the ability to change the pitch of it before it plays ?
[2] Is there a way to COPY and PASTE SFX data from one PICO-8 app or Notepad to another ?
[3] When defining values for local variables, if you need to define more than one, it either requires 2-lines of code:
local a=1 local b=2 |
Or this unusual way:
local a,b=1,2 |
Is it possible someway to do it like this ?
local a=1,b=2 |
If you try this, you get an error.
If you try it this way:
local a=1 b=2 |
Then "b" value is set, but it is global.
[1] SFX are memory-mapped, so you could poke stuff into them dynamically. See:
- https://pico-8.wikia.com/wiki/Memory#Sound_effects
- https://pico-8.wikia.com/wiki/Memory#Hardware_state
[2] Not to my knowledge, at least not at the moment. We've requested it from @zep previously, so we'll see if it's in the next version. You could use the memory mapping info above to write functions that then export and import a given effect number to the clipboard using printh() and stat(). See:
[3] Nope. Think of it as a tuple assignment, not a variable list. Same is true for globals, sans the 'local' keyword. Avoid putting the 'local' keyword in the same mental box as the declared type in another language and it'll bother you less. :)
[Please log in to post a comment]