Tutorial Making Circular Spells in GUI *WIP*

Demonwrath

Happy[ExtremelyOverCommercializ ed]HolidaysEveryon
Reaction score
47
Making Circle Spells Using GUI
created by: Demonwrath

This tutorial is made to help the community with triggering Circular Spells in GUI. It is made with all knowledge I have, so if there are any parts that should be included, please send me a PM, notifying me of what else should be included and I shall add it.

First I shall explain different ways of making Circular Spells.

For starters, there are three (3) basics behind Circular Spells:
1. Creating a Circle of Models
2. Allowing for Your Circle to 'Follow' a Unit/Hero
3. Making your Circle rotate around a Point, or Unit/Hero

More advanced Circle Spells can:
1. Move towards out out from a point
2. Circle a unit with increasing/decreasing height
3. Move in and out of a point while rotating
4. Rotate around a point while increasing/decreasing in height
5. Rotate around a point while moving in and out as well as increasing/ decreasing in height.

The more you know about creating Circular Spells the better, so above is everything I know what to do with Circular spells, and will somewhere be included in this Tutorial. Lets begin :D

What is a Circular Spell?

A Circular Spell is a spell which when activated, creates, objects (Orbs are most common) around the casting unit. Below is an example of what a Circle Spell looks like:

Now some of you may be sitting there thinking, 'OMFG THAT IS SO COOL!!!!' This is the most basic a spell that can be made using the techniques in this tutorial.

Circle Spell Basics

1. Creating a Circle of Models

Before we begin, you will need basic knowledge of:
1. Making Dummy Units
2. The Trigger Editor
3. Variables

For this spell, we are going to have our Hero have a circle of Invulnerability Orbs (the effects from a Paladin's Divine Shield Spell) appear around him.

First we will begin by creating our Dummy unit.
First create a custom Footman in the Object Editor, and give it the name 'Divine Shield'


We will change up the Model File of the Unit, so that it is easier for us to find, and use. Change the Icon to the Divine Shield icon, and the Model File to that of the one for Divine Shield (the Model is under: Abilities- Reveal <Caster>, Item Area Detection <Caster>). Finally, go to Abilities - Normal, and add the 'Locust ability to the unit. The dummy is now finished:


Now that the dummy is finished, we will go into the Trigger Editor and create some Variables. You will need the following variables:

This is what each variable is made to do:
casterPoint - a Point that gets set to the position of your casting unit when they activate the spell.
spell1_Orb - A Unit Array that will be used to create the orbs (your Dummy Model) around the Hero. The array is set to 10 so we can create 10 Orbs
spell1_OrbPoint - A Real Array that will place the Orbs when the spell is cast. It has an array of 10, one for each Orb Created.

Okay, just one more step then we can start triggering this spell!!!

We need to make a dummy ability to use for the Orbs. Roar usually works well. Create the dummy spell just as you did your dummy unit, then change the icon and effects to whatever you wish. I am going to change the caster effects so that when the spell is cast it does the 'Archimonde Dark Portal' effects over my Hero. When your spell is finished, give it to your Hero.
NOTE: Make sure you change the Stats - Hero Ability section to True so your Hero can use the Ability

When that is ready, open up the Trigger Editor :D
Create a new trigger for the spell. You will need to make the Event:
Code:
Unit - A unit Starts the effect of an ability
This makes it so the trigger activates when any unit casts and ability. To make sure that this trigger only works for your Dummy Ability set your Condition to:
Code:
(Ability being cast) Equal to <Your Spell>
This makes it so that if the spell being cast isn't your Dummy Spell, then the trigger won't execute. Now onto the Events of the trigger.

First, we must set our variable, casterPoint, to the position of our Hero, the caster, with the following line:
Code:
Set casterPosition = (Position of (Casting unit))

Now every time we need to set an Orb to a point, we can select casterPoint, instead of Casting Unit. This also makes it easier to eliminate leaks when the trigger in finished. Next we need to create our Orbs, to do so, we put this into a loop, whether it is Integer A or Integer B does not matter, but for standards, i will use Integer A.
Code:
For each (Integer A) from 0 to 9, do (Actions)
    Loop - Actions
NOTE: Never start an Integer A or B loop at 0. I currently don't know why, but I was told that, if someone could clarify why, I will edit this :p

Now we get into the bulk of the trigger, creating the Orbs. I bet you are reading this and thinking, 'IT'S ABOUT BLOODY TIME!!!' now lets get to this.
First we will create our orb. For this spell we will make the Orbs at a distance of 250 units away from the Hero. Each orb will be 36 degrees apart from each other (10 orbs x 36 degrees apart = 360 degrees = full circle):
Code:
Loop - Actions
    Unit - Create 1 Divine Shield for (Owner of (Casting unit)) at (casterPosition offset by 250.00 towards (36.00 + (Real((Integer A)))) degrees) facing Default building facing degrees
    Set spell1_Orb[(Integer A)] = (Last created unit)
    Set spell1_OrbPoint[(Integer A)] = (72.00 x (Real((Integer A))))

CONGRATULATIONS!!! YOU HAVE JUST CREATED YOUR FIRST CIRCULAR SPELL!!!!!!

That is all for now folks. Tomorrow I will add how to add a timer so the Orbs disappear, as well as how to make the Orbs follow your Cast Unit :D
 

RedRage

New Member
Reaction score
7
Might i just add their is a tutorial in making circles, but this one is less complicated gj +rep
Code:
(10 orbs x 36 degrees apart = 360 degrees = full circle):
I don't see you applying that anywhere in your trigger
 

Demonwrath

Happy[ExtremelyOverCommercializ ed]HolidaysEveryon
Reaction score
47
Whoops, sorry, forgot to edit that ^_^

Give me a min :p

EDIT: There, it should be better now.
 

RedRage

New Member
Reaction score
7
yep now i c :D
And the 72 x Integer A might want to explain how you did that also, some people might now know
 

Demonwrath

Happy[ExtremelyOverCommercializ ed]HolidaysEveryon
Reaction score
47
I will edit that in the morning, I got 2 go 2 bed now, I got work early tmr :(
 

0zaru

Learning vJASS ;)
Reaction score
60
I told you to start at 0 'cause i was trying to save code space (Simplefying all the sets of the positions to a Multiply operation)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top