[Macro] Wait/Delay for something?

Hi All, Just upgraded to pro yadda yadda. New to roll20... sort of, put 300 hours in so far and sponging up as much information as possible. So right now, I'm tying sound effects to macro's, however there's a delay between roll/special effect/sound effect right now, so I was wondering if there was a delay ### to set a delay or a wait ### to make a delay command. Or if there's a waitfor command. Any information would be awesome! Thanks!
1484165601
The Aaron
Pro
API Scripter
There isn't any way of doing that outside of the API.  Even in the API, it has to be explicitly handled.  What's an example of one of your macros?
1484166468

Edited 1484166644
It's a simple fire-breath script. Nothing complicated. &{template:default} {{name= Ice Knight}} {{attack= Frost Breath}} {{Damage Save= Dextertity}} {{Info= 2d4 Cold Damage on Fail. Half on Success.}} {{DC= 10}} /fx donBreath @{target|token_id} !sfx action:play unique:true song:fireBreath volume:100 The sound effect has a slight delay of quiet before it makes the sound of the fire breath, so I was hoping there is something I can do to have it delay the /fx to kind of better sync things together. Is there an API available that does allow a /wait or /delay command?
1484169190

Edited 1484169298
Scott C.
Pro
API Scripter
The API runs on javascript, which is single threaded. This means it can only do a single thing at a time and similarly, the chat parser handles each line of chat as it's own message and parses it sequentially from top line to bottom line. For a lot of things this doesn't matter as it processes things so fast that you don't notice it is doing things in sequence. In working on my audio script, Roll20AM, I noticed that the API seems to take a fraction of a second or so longer to process play/pause/volume adjust jukebox tracks. While I don't know of any scripts that allow you to add a delay to commands in the way you're talking about, one thing I might suggest is switching the order of your fx and !sfx commands. I have no idea if this will actually have an effect, but it might be worth a shot. EDIT: The other thing to check is your audio file that you are playing. Does it have a delay when you just hit play on it in the jukebox?
Scott C. said: The API runs on javascript, which is single threaded. This means it can only do a single thing at a time and similarly, the chat parser handles each line of chat as it's own message and parses it sequentially from top line to bottom line. For a lot of things this doesn't matter as it processes things so fast that you don't notice it is doing things in sequence. In working on my audio script, Roll20AM, I noticed that the API seems to take a fraction of a second or so longer to process play/pause/volume adjust jukebox tracks. While I don't know of any scripts that allow you to add a delay to commands in the way you're talking about, one thing I might suggest is switching the order of your fx and !sfx commands. I have no idea if this will actually have an effect, but it might be worth a shot. EDIT: The other thing to check is your audio file that you are playing. Does it have a delay when you just hit play on it in the jukebox? It has a brief delay which is recorded as silence before the actual sound begins. Tried changing the order, no success as it processes as you said, fairly quick.
I had the same issue - I switched to using: Terran fire 1 by Elsuaj24
1484197459
Brian
Pro
Sheet Author
API Scripter
Kyle/Grimsley said: Is there an API available that does allow a /wait or /delay command? Store Commands can, although I don't recall if it can handle API commands or not.
Brian said: Kyle/Grimsley said: Is there an API available that does allow a /wait or /delay command? Store Commands can, although I don't recall if it can handle API commands or not. Time to see! Thank you!