Fireball what’s up this is my spell casting system hi Uncle but how did I make it well for any of you interested this is the giant command block stack that runs my magic casting system so it has a few different systems working in tando first off we have our general cast detection This controls adding and minusing the scoreboard that you see on the right hand side there that detects it forecasting and the whole premise is once that reaches a thousand that’s when we actually trigger our spellcast and of course there’s a few hidden mechanics in with that one we have to shift on the Spot so if we decide to move you can see that the casting gets decreased so if you want to move and cast it’s going to take you significantly longer to cast in fact sometimes it’s going to be downright impossible depending on how quick you’re moving so the way this Works is I am essentially placing an invisible armor set that’s now detecting whenever the player is colliding with it so as long as it plays on top of it it’s going to cast other than that we now have to determine the casting type so that’s this command blockchain that you see is activated While I have the spell book so there’s the five different modes each of these different command block segments and depending on which one is active depends on the spell book so as long as we have incantation direct Redstone is placed activating these command blocks and this allows us to summon a projectile in Front of us whichever way we’re facing so if we’re facing diagonal for instance we still get a particle and a fireball perfect of course each mode has a different version of casting but the way the casting Works to put it simply is again I’m summoning an invisible arm Stand that I’m now using to detect when it collides with a hostile or I should say an alternative mob and what it does that’s when it triggers the actual spell effect so then how about the spell effect well that’s where this giant stack comes into it so we’ve got 25 Different rows so each of these is a different type of spell you can see the one that’s currently activated is of course our fire chart so we’ve got two sides to it one handles the particles and sound effects next we handle the actual effect that’s triggering so for instance we’re Playing the fire extinguish we are adding our burn tag which ties back into my status effect system and we’re also setting a fire at the entity’s feet on the opposite side we have a bit of a different system first here we have our generic damage so anytime Fireball hits Something it’s going to apply instant damage and instant Health depending on the type of mob and that’s how we work out our basic damage and then these four are a bit more special so for instance if this spell projectile were to collide with someone else’s they would then gain the Properties of one another I’ve built a system that allows multiple people to cast at once and affect each other’s spells and I thought that’s a pretty unique system other than that we also have casting modifiers so for instance this adds one to our is casting score meaning that when you’re casting five or You’re actually doing it quicker than a normal spell each spell has their own hidden multiplier or negative value that will either increase casting time or reduce it the same goes for all the different incantations for instance I have our Omega book here this has every single charm and every type of Incantation if I were to try and cast with it we can see that the is casting time is significantly slower that’s because I have every single effect running so the scoreboard system is essentially at its maximum and it’s taking about 50 seconds to actually cast the spell Plus there’s a ton of particles but we’re only interested in this one and then the last thing to talk about is cleanup so how am I making sure to a delete the particles delete the armor stand and make sure everything doesn’t seamlessly Loop well we are adding different tags and different effects to Our different systems so for instance when I cast a spell there’s actually something special happening and it’s not just as simple as that so if I grab out a command block quickly and all we’re going to type in is execute at entity type equals marker run article doesn’t really matter what Particle we’ll just do angry villages zero zero zero one make it 10 nice and simple so now if we cast we can actually see what’s happening behind the scenes so you can see there’s a bunch of those angry villager Panic effects this is how I detect the the particle or the Projectile or really it’s an armor stand how I detect the arm stand hitting something else and the way it works is through markets so at the arm stands location I’m spawning a marker in all these different positions around it to essentially create a dynamic box this box allows us to detect Collision Far better than just using an arm stand because something you may notice if you’ve ever tried to work with motion is at certain speeds entities just don’t trigger hitboxes they move through one another before the game can properly detect when they’re overlapping so in order to get around that we make Stationary markers that are then deleted after a set interval for instance it’s once their age gets to five so this is five ticks or one-fourth of a second as for the actual arm stand now that is a lot easier of a process so the arm stands I’m summoning have a particle Effect so for the most part I think it’s just luck really it doesn’t matter the most important thing is I can set a duration this means I can detect whenever an armor stand exists that doesn’t have a active effect and delete it meaning that I can give each projectile a specific Life span so for instance the projectile of just the direct incantation has a life of 30 ticks or one and a half seconds and then it gets deleted that thing I look to the right one really 60 seconds two seconds in two seconds then it’s deleted other than that it’s a Fairly simple system and just uses these small components that are then tied together to create a really Dynamic and interesting system at least in my opinion simple fact that you can take five different spell types and then uh 25 different actual elements and combine them in a bunch of different Ways to create some pretty crazy spells anyway I hope you enjoyed thanks for watching Video Information
This video, titled ‘[Minecraft] How My Spell System Works in Vanilla | Command Block Hub’, was uploaded by Kllooooyy on 2023-01-13 12:00:21. It has garnered 42 views and 5 likes. The duration of the video is 00:06:55 or 415 seconds.
#minecraft In this video we continue to work on a massive command block hub to reimagine vanilla gameplay adding a ton of new features and mechanics. Today we are looking at the magic system, showcasing and testing it out.
Twitch – https://www.twitch.tv/kllooooyy TikTok – https://www.tiktok.com/@kllooooyy Discord – https://discord.gg/cD8rbWEfxk
Inked Gaming Custom Playmats & More (Not Sponsored) $10 Off Click Link & Follow the Prompts https://i.refs.cc/SfYo9nqH?smile_ref=eyJzbWlsZV9zb3VyY2UiOiJzbWlsZV91aSIsInNtaWxlX21lZGl1bSI6IiIsInNtaWxlX2NhbXBhaWduIjoicmVmZXJyYWxfcHJvZ3JhbSIsInNtaWxlX2N1c3RvbWVyX2lkIjo4MjM0MTk3NDB9