SecondsSince / execution delay #2456
-
Greetings all, Thank you to everyone who's involved in this amazing software. Honestly, Elite would feel so empty without EDDI. I always feel bad for people who don't know about this great software as they're missing out on so much. I wish Frontier would shine a spotlight on this great work of art. I'm sorry to ask about this as the post isn't to highlight a bug or issue, but is to ask for some help (if possible) please.
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 4 replies
-
To try to explain my ways of thinking of the two approaches which are both not working, so far: First attempt was:
Second attempt was:
Hopefully that explains the situation clearly? If you can see where I'm going wrong or if neither of my ideas are the best method, I look forward to hearing back o7. Many thanks |
Beta Was this translation helpful? Give feedback.
-
From https://www.unixtimestamp.com/:
Thus: Your second attempt, taking the difference between the invocations of o7 |
Beta Was this translation helpful? Give feedback.
-
An alternative approach might be to use |
Beta Was this translation helpful? Give feedback.
-
Unsubscribe
…On Sun, Jan 1, 2023, 09:51 Brian Wilson ***@***.***> wrote:
An alternative approach might be to use SetState() to track the status of
various Carrier stats variables an suppress repeats where those variables
are unchanged.
—
Reply to this email directly, view it on GitHub
<#2456 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHWTUDT57M5DA3YQFQC7YBTWQFAPZANCNFSM6AAAAAATLFDSBA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I had a similar problem with "Body scanned" script: I'm too fast scanning and when I was jumping to the next system, EDDI was still telling me a body was scanned... My approach is similar to yours. In my case the waiting time is the time that takes to speaks the actual message. So if EDDI is already talking and I scan a body meanwhile, that scan will not be reported (unless is a valuable body, in that case it will be queued). For this method I use 2 state variables: The code goes like this:
That round(len(report) * 0.05)) is how I calculate the waiting time: 0,05 seconds per letter. I guess in your case, the cooldown should be fixed. |
Beta Was this translation helpful? Give feedback.
-
Unsubscribe
…On Tue, Jan 10, 2023, 1:42 AM Transcan ***@***.***> wrote:
I had a similar problem with "Body scanned" script: I'm too fast scanning
and when I was jumping to the next system, EDDI was still telling me a body
was scanned...
My approach is similar to yours. In my case the waiting time is the time
that takes to speaks the actual message. So if EDDI is already talking and
I scan a body meanwhile, that scan will not be reported (unless is a
valuable body, in that case it will be queued).
For this method I use 2 state variables:
*state.eddi_context_body_lastscan_timestamp* to save the scan time.
*state.eddi_context_body_lastscan_cooldown* for saving the waiting time
where no more message would be spoken.
The code goes like this:
{if !state.eddi_context_body_lastscan_cooldown: {SetState('eddi_context_body_lastscan_cooldown', 0)}}
...
{if ((SecondsSince(state.eddi_context_body_lastscan_timestamp) > state.eddi_context_body_lastscan_cooldown) && (system.totalbodies != system.scannedbodies)) || isWorthy(reportbody):
{SetState('eddi_context_body_lastscan_timestamp', SecondsSince(0))}
...
{SetState('eddi_context_body_lastscan_cooldown', round(len(report) * 0.05))}
...
}
That *round(len(report) * 0.05))* is how I calculate the waiting time:
0,05 seconds per letter.
I guess in your case, the cooldown should be fixed.
But the good thing about this method is you can extend the cooldown
whenever is needed: For example, increasing some more delay each time the
menus are reloaded.
—
Reply to this email directly, view it on GitHub
<#2456 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACE3T6262UTYULC5QN5ZXZLWRSH6BANCNFSM6AAAAAATLFDSBA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
An alternative approach might be to use
SetState()
to track the status of variousCarrier stats
variables an suppress repeats where those variables are unchanged.