Post by niblexis on May 26, 2017 0:45:13 GMT -5
The ParticleProjectilesSpell is an incredibly flexible spell that allows you to fire a "projectile" composed entirely of particles.
All information referenced on this tutorial regarding particle projectile spells can be found here.
Spell Options
All of these options may look a bit daunting at first. So, I'll go through what may be considered complicated ones.
projectile-horiz-offset: You can use this option to specify how many degrees you want the projectile to be offset by horizontally. Here's a makeshift visual aid for it.
projectile-vert-offset: The vertical offset is a lot more difficult to navigate than the horizontal offset, and as the description said, it works in some weird metric. You'll have to just tinker around to find the right value.
special-effect-interval: This option allows you to specify how often to play any effect with the "special" position attached to your particle projectile spell, in ticks. (20 ticks/1 second)
Example Use
Let's say you want to make a magic wormhole that you can set down where you're standing and have it suck enemies into it.
We'll focus on the particle projectile side of this, as opposed to AoESpells and other things.
We'll start out by establishing the spell.
From there, you just simply have to create your Wormhole AoE, and establish a ForceBombSpell with negative velocity. You'll want your radius on hitting to be larger than the wormhole itself, so targets can be sucked in from afar.
Now, you may be wondering why some options were left out.
It's incredibly important in MagicSpells to realize that you don't need to put in every option in your spells. A rule of thumb is to only put in options that you need to change from default. In this case, I didn't need to put in projectile-horiz-offset: 0, since it defaults to 0. This saves you space in the long run as well as a lot of time.
On top of that, I set the hit-radius to 0. This is because the particle projectile itself does not need to hit anything to activate. It activates on a timer during its existence.
All information referenced on this tutorial regarding particle projectile spells can be found here.
Spell Options
All of these options may look a bit daunting at first. So, I'll go through what may be considered complicated ones.
projectile-horiz-offset: You can use this option to specify how many degrees you want the projectile to be offset by horizontally. Here's a makeshift visual aid for it.
projectile-vert-offset: The vertical offset is a lot more difficult to navigate than the horizontal offset, and as the description said, it works in some weird metric. You'll have to just tinker around to find the right value.
special-effect-interval: This option allows you to specify how often to play any effect with the "special" position attached to your particle projectile spell, in ticks. (20 ticks/1 second)
Example Use
Let's say you want to make a magic wormhole that you can set down where you're standing and have it suck enemies into it.
We'll focus on the particle projectile side of this, as opposed to AoESpells and other things.
We'll start out by establishing the spell.
Wormhole_Particle-Projectile:
spell-class: ".instant.ParticleProjectileSpell"
projectile-velocity: 0 ##We set the projectile velocity to 0 so that it won't move.
hug-surface: true ##We set this to true so that the projectile will stick to the ground. Alternatively, we could also set projectile-gravity to 0. However, I prefer this option.
particle-name: witchMagic ##The best wormhole particle, obviously.
particle-count: 30 ##This can be adjusted to however many particles you want to have in your wormhole.
particle-speed: 0.002 ##We set this to 0.002 to prevent the particle from flying around. This will keep them still.
particle-horizontal-spread: 0.3 ##This can be adjusted to however large you want the wormhole to be horizontally, adjust the AoE accordingly.
particle-vertical-spread: 0.3 ##This can be adjusted to however large you want the wormhole to be vertically, adjust the AoE accordingly.
max-duration: 15 ##You can put this to be however long you want the wormhole to last. The value is in seconds.
hit-non-players: false
hit-ground: false
hit-air-at-end: false
hit-air-during: true ##Setting this to true allows the wormhole AoE to be constantly cast.
spell-interval: 1 ##This sets the wormhole AoE to be ran every 1 tick.
spell: Wormhole_AoE
From there, you just simply have to create your Wormhole AoE, and establish a ForceBombSpell with negative velocity. You'll want your radius on hitting to be larger than the wormhole itself, so targets can be sucked in from afar.
Now, you may be wondering why some options were left out.
It's incredibly important in MagicSpells to realize that you don't need to put in every option in your spells. A rule of thumb is to only put in options that you need to change from default. In this case, I didn't need to put in projectile-horiz-offset: 0, since it defaults to 0. This saves you space in the long run as well as a lot of time.
On top of that, I set the hit-radius to 0. This is because the particle projectile itself does not need to hit anything to activate. It activates on a timer during its existence.