Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 144
    • Issues 144
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Wiki
    • Skills
  • Intratick Scheduling

Intratick Scheduling · Changes

Page history
Create Skills/Intratick Scheduling authored May 01, 2024 by Lxlp's avatar Lxlp
Hide whitespace changes
Inline Side-by-side
Showing with 74 additions and 0 deletions
+74 -0
  • Skills/Intratick-Scheduling.md Skills/Intratick-Scheduling.md +74 -0
  • No files found.
Skills/Intratick-Scheduling.md 0 → 100644
View page @ e252d99b
The [delay] mechanic can be used to apply a delay not only *between* ticks, but also inside of the same tick via a `delay 0` mechanic.
## Single Delay
You have to imagine each mechanic as a series of instructions that are executed orderly. In this scenario, using a `delay 0` mechanic allows you to "schedule" the subsequent mechanics to be executed *after* every other non delayed mechanic that tick.
```mermaid
flowchart LR
A(Mechanic 1) --> B(Mechanic 2)
B --> C[Delay 0]
B ---> D(Other mechanics this tick)
C ----> F(Mechanic 4)
```
### Example
```yaml
ExampleMechanic:
Skills:
- skill{s=Skill1} @self
- skill{s=Skill2} @self
Skill1:
Skills:
- delay 0
- message{m="<skill.var.test>"}
Skill2:
Skills:
- setvariable{var=test;val=1}
```
## Multiple Delays
This behavior works with multiple delays too: each time a new `delay 0` is executed, the subsequent mechanics are pushed a the back of the execution line *again*
```mermaid
flowchart LR
A(Mechanic 1) --> B(Mechanic 2)
B --> C[Delay 0]
B ---> D(Other mechanics this tick)
C ----> F(Mechanic 4)
F --> G(Delay 0)
F ---> H(Other mechanics this tick)
G ----> L(Mechanic 6)
```
### Example
```yaml
ExampleMechanic:
Skills:
- skill{s=SkillMessage} @self
- skill{s=Skill1} @self
- skill{s=Skill2} @self
Skill1:
Skills:
- delay 0
- setvariable{var=test;val=2}
Skill2:
Skills:
- setvariable{var=test;val=1}
SkillMessage:
Skills:
- delay 0
- delay 0
- message{m="<skill.var.test>"}
```
<!-- LINKS -->
[delay]: /Skills/Mechanics/delay
\ No newline at end of file
Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
FAQ / Common Issues
Guides
Troubleshooting
Mythic Add-ons
Compatible Plugins
API Information
Packs
  • Pins
Mobs
  • Mob Options
    • Display Options
  • Mob Levels
  • Mob Factions
  • Power Scaling
  • Damage Modifiers
  • Equipment
  • BossBar
  • Custom AI
  • Custom Kill Messages
  • Threat Tables
  • Immunity Tables
  • Templates
  • Vanilla Overrides
  • Extra: Disguises
  • Extra: ModelEngine
Skills
  • Mechanics
  • Targeters
    • Filters
  • Triggers
  • Conditions
    • In-line conditions
  • Metaskills
  • Placeholders
  • Variables
Items
  • Options
  • Attributes
  • Enchantments
  • Potions
  • Banner Layers
  • Firework
Drops & DropTables
  • Drops
  • DropTables
  • FancyDrops
Spawning
  • Spawners
  • Random Spawns
Stats
  • Custom Stat Options
  • Modifiers
  • Built in Stats
Technical
  • Math
  • Operations
    • Attribute Operations
    • Stats Modifiers
  • Particles Types
  • Audience
  • Equipment Slots
Examples
Useful Tips