- Contributors
- Lego_freak1999, TPGamesNL
- Supported Minecraft Versions
- 1.12
- 1.13
- 1.14
This skript api allows you to work with timelines.
A timeline is a list of timecodes that execute code in a chronological time spectrum.
A timecode is a timestamp formatted like this:
This is a offset time to the start point of the timeline.
Code:
HH::MM::SS::mmm
H = Hours
M = Minutes
S = Seconds
m = Milliseconds
This is a offset time to the start point of the timeline.
Timelines are not made to replace
But timelines are a great replacement if u want to time shows/effects in sync with audio.
1:
Because of the use of timecodes ur code is alot more cleaner and readable wenn making a timed code.
2:
No server lag desync. No this doesn't make ur server less laggy, But wenn the server experiences lag the timeline makes shure it will still execute code at the right time and will catch-up after a huge lagg spike.
But timelines are a great replacement if u want to time shows/effects in sync with audio.
1:
Because of the use of timecodes ur code is alot more cleaner and readable wenn making a timed code.
2:
No server lag desync. No this doesn't make ur server less laggy, But wenn the server experiences lag the timeline makes shure it will still execute code at the right time and will catch-up after a huge lagg spike.
The use of timelines isn't as efficient as just using
Skript 2.4 https://github.com/SkriptLang/Skript/releases
Skript-Mirror 2.0.0 https://skripttools.net/dl/skript-mirror+2.0.0-SNAPSHOT.jar
Skript-Mirror 2.0.0 https://skripttools.net/dl/skript-mirror+2.0.0-SNAPSHOT.jar
Code:
Expressions:
(start|new|create) timeline
[timecode] %HH%::%MM%::%SS%::%mmm%
Effects:
(stop|delete) timeline %timeline%
wait for %timecode% in %timeline%
Code:
#Example Basic timeline
command /basictimeline:
trigger:
set {_timeline} to start timeline
wait for timecode 00::00::01::000 in {_timeline}
send "1 second later"
wait for timecode 00::00::02::000 in {_timeline}
send "2 seconds later"
wait for timecode 00::00::03::000 in {_timeline}
send "3 seconds later"
delete timeline {_timeline}
#Example stop a timeline
command /stopabletimeline:
trigger:
set {timeline} to start timeline
set {_timeline} to {timeline}
wait for timecode 00::00::01::000 in {_timeline}
send "1 second later"
wait for timecode 00::00::02::000 in {_timeline}
send "2 seconds later"
wait for timecode 00::00::03::000 in {_timeline}
send "3 seconds later"
delete timeline {_timeline}
delete {timeline}
command /stoptimeline:
trigger:
stop timeline {timeline}
delete {timeline}
Using delayed effects in a timeline can cause the next timecodes to trigger tolate.
Timecodes should be later than timecodes before them.
Not deleting the timeline isn't a problem but will cause variables to stackup till a restart.
Timecodes should be later than timecodes before them.
Not deleting the timeline isn't a problem but will cause variables to stackup till a restart.
Code:
#Example how !!!not!!! to use
function test():
wait 4 seconds
send "2"
command /Wrongtimeline:
trigger:
set {_timeline} to start timeline
wait for timecode 00::00::01::000 in {_timeline}
send "1"
wait 4 seconds # Using delays or delayed effects here can cause the next timecodes to trigger tolate. In this example the 3 will be send >1 second tolate.
send "2"
test() #U can run a function or custom effect if u still want to use delays without messing up timecodes.
wait for timecode 00::00::04::000 in {_timeline}
send "3"
wait for timecode 00::00::03::000 in {_timeline} #Timecodes should be later than timecodes before them.
send "4"
#Not deleting the timeline isn't a problem but will cause variables to stackup till a restart.
Pause and continue timelines
Jump to a timecode in a timeline (forwards and backwards)
2.0 version wich supports using delayed effects inside of timelines
Hook with my other resource McJukeBox Api
Suggestions?
Jump to a timecode in a timeline (forwards and backwards)
2.0 version wich supports using delayed effects inside of timelines
Hook with my other resource McJukeBox Api
Suggestions?