Tutorial Guide for New custom spells creator

simonake

New Member
Reaction score
72
Please take note that this tool is for the New and not for the advanced spells creators.
It's regoup information about use of the most used variables that a creator will probally have to use.

Notes
-When you want to know the Variable type of what box you're on, look at the left, top corner the name. It's supposed to be the name of the Variable type.

-(Triggering unit) is the actor of the event. For example, "Unit Start the effect of an ability" the (Triggering Unit) would be the caster.

-If you search for a Dummy spell, try using the Ability "Chanel" that is find in Neutral Hostile --> Hero --> Channel make sure to check in Options "Visible".

-To change a units Flying Height, the unit need to be able to fly, i suggest you to add the spell Crow.

-When searching a Varaible type, when you have to set the name, array or not etc... , you can select any varaible, and type on your keyboard the first letter of your variable. Type it till you have the one you wanted.

1 - Variables

A) Unit
The unit variables are used to refer, most of the time, a unit after a "Wait" or in another trigger. To reffer to the caster, you can use one of the this code
Trigger:
  • Set MySpellCaster = (Triggering unit)

or
Trigger:
  • Set MySpellCaster = (Casting unit)

To reffer to the target, use this function.
Trigger:
  • Set MySpellTarget = (Target unit of ability being cast)


B)Location
The Location can be the Postion of a unit, a region, the Target Point of Ability being cast. When you use it for the position of a unit it's like a "shortcut" because you have to select instead of selecing Position of unit then wich unit.
If you want to set a point away from a unit, use the [Point with polar offset] and use a code like this:
Trigger:
  • Set MySpellLocation = ((Position of ( a unit )) offset by (Range you want) towards (Facing of ( a unit ))


C)Integer
The Integer
As the an Integers are in the Real life, it's a number with no numbers after the dot, like 1. It's used to all the numbers that cannot have halfs like the Level of a unit, Level of an ability for a unit, player count, etc...
Trigger:
  • Set MySpellInteger = (Level of MySpell for ( a unit ))

Integer can be converted into Reals, Strings, Radians, Degrees.

D)Real
As the Reals are in the Real life, it's a number with numbers after the dot, like 1.00. It's used for all the numbers that can have halfs like damages, radius, distance, etc...
Trigger:
  • Set MySpellReal = 100.00

Integer can be converted into Integers, Strings, Radians, Degrees.

E)Unit Group
It's simple, it's a Group of unit that can be selected to make the units it contains do actions.
Trigger:
  • Unit Group - Pick every unit in MySpellUnitGroup and do (Actions)
    • Loop -

To reffer to the unit you picked use (Picked unit)

F)Custom Scripts
Custom Scripts are parts of jass codes that have not been modified to Gui options. The one you will probally need are these one
Trigger:
  • Actions
    • call RemoveLocation(udg_(name of variable))
    • call Destroygroup(udg_(name of variable))


All variables can be used for a spell. These are just the most used ones.

2 - The dummy
The dummy unit is a unit that you create an order to do something. The dummy must be invisible, have no collision size and no shadow.
To order him to do something, use Issues. If the spell you add is Hex from Shadow Hunter then use
Trigger:
  • Unit - Issue (Last created unit) to Hex - Shadow Hunter (Target unit of ability being cast)

It will work, if you use the right Issue.


Comments, suggestions? Questions about spells? feel free

S i m o n a k e

Here's demo map of some spells that can help you figure out how to do yours.
 

_whelp

New Member
Reaction score
54
Why'd you post it as a tool, shouldn't it be a tutorial?

Anyways, I skimmed through your post and it looked decent.
 

simonake

New Member
Reaction score
72
It helps. Not teach. It's a tool for the ones who'd like to create spells without having to ask.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
As the an Integers are in the Real life, it's a number with no numbers after the dot, like 1. It's used to all the numbers that cannot have halfs like the Level of a unit, Level of an ability for a unit, player count, etc...

...

An integer is a number that is not a fraction, simply.

As the Reals are in the Real life, it's a number with numbers after the dot, like 1.00. It's used for all the numbers that can have halfs like damages, radius, distance, etc...

A real is a rational or an irrational number.


The tutorial lacks content-depth and explains definitions very vaguely.

Plus it really doesn't have the length to be considered as a proper tutorial.


You should add more details, fix the leaks in your scripts and really, pick a topic you want to teach. Currently, you talk about everything - variables, custom scripts, different functions. It's a mess.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
How is that relevant to the current topic?

JASS NewGen Package extends the regular JASS with fancy options.

For example, libraries, scopes, structs, to name a few.

These features help coders to make more flexible code easier.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top