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 160
    • Issues 160
    • 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
    • Mechanics
  • ForEach

ForEach · Changes

Page history
Create skills/mechanics/ForEach authored Jul 22, 2025 by Lxlp's avatar Lxlp
Hide whitespace changes
Inline Side-by-side
Showing with 29 additions and 0 deletions
+29 -0
  • skills/mechanics/ForEach.md skills/mechanics/ForEach.md +29 -0
  • No files found.
skills/mechanics/ForEach.md 0 → 100644
View page @ 0fc921e9
## Description
Executes the specified metaskill *once and separately* for each target of the mechanic. Each metaskill that will be called will have a single entity/location (from among the original targets) as its inherited target.
## Attributes
| Attribute | Aliases | Description | Default |
|-----------|-----------|----------------------------------------------------------------------|---------|
| targettype | targett, tt | Which type of targets this mechanic should iterate on. Can be `ALL`, `ENTITY` or `LOCATION`| ALL<!--type:ALL,ENTITY,LOCATION-->|
> This mechanic inherits every attribute of the [Skill](/skills/mechanics/skill) mechanic
## Examples
```yaml
# Skills file
ExampleForEach:
Skills:
- setvariable{var=skill.listuuid;type=STRING;val=""} @self
- foreach{skill=ExampleSkill} @PIR{r=10;sort=NEAREST}
- message{m=<skill.var.listuuid>}
ExampleSkill:
Skills:
- variableadd{var=skill.listuuid;value=<target.uuid>}
```
<!--TAGS-->
<!--tag:Meta-Mechanic-->
\ No newline at end of file
Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
Mythic Add-ons
Compatible Plugins
API Information
Config Files

Guides
  • Troubleshooting
  • FAQ / Common Issues
  • Examples
Packs

MythicScribe MythicScribe - VSCode Extension

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
    • Mechanics by Tag
  • 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

Other
  • Math
  • Pins

Enums
  • Particles Types
  • Audience
  • Equipment Slots
  • Operations
    • Attribute Operations
    • Stats Modifiers
  • Shape
Technical
  • Item Matcher
  • SkillTree
  • Advanced User Guides and Techniques