• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Spell Check

Status
Not open for further replies.
Level 3
Joined
Apr 18, 2018
Messages
58
Hi to everybody, I just registered on Your website. Currently developing a map of my own. Read the tutorials You guys have here. I do have some issues working with triggers though. Wanted to know if it is possible to ask for help in checking the spell.

The idea of a spell I am working on is rather simple, it does not seem to be working properly, probably because I am newbie at this, however You might have some ideas and desire to give me a hand.

Spell needs to heal the allied units around the hero - caster of the spell exactly like in-game spell Holy Light. Since the spell idea is to target allied units around hero I based my spell on in-game spell Thunder Clap. I will upload the picture of triggers I came up with, I know it probably looks horrible, because I am just starting to learn triggers.

Massive Heal.PNG


Caster of the spell ends up healing himself only. Another issue the heal amount is not 200 hp, it is his full health. I know this request is probably too simple, but it will help me to get started.
 
Level 15
Joined
Jul 9, 2008
Messages
1,552
First off i suggest u find a tutorial on leaks this has muiltiple

Are u sure u want the ability to only work for that paladan. If not use generic unit event
  • Unit - A unit starts the effect of ability

Why are you adding life when the dummy ability your using adds life

Anyways that line is in the group loop meaning it will add 200 hp to the caster for each unit in the group. So if there is 5 units in the group it will add 200 hp to the caster 5 times

Maybe u meant to change this to picked unit?
 
Level 3
Joined
Apr 18, 2018
Messages
58
The idea of spell is to heal the caster and every unit within range of ability for 60/90/120/150/180 hp for every level of the ability.

I will certainly take a look into the leak tutorial.

Why are you adding life when the dummy ability your using adds life. Meaning what exactly, which line do You refer to?
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
@Primstan Major points (spell breaking)
When you are picking the unit group
(Target unit of ability being cast) does not exist.
Thunder Clap does not have a target at all. I believe it should be (Matching unit) there.

You are also healing (Target unit of ability being cast), which we have established that does not exist.
This case, should be (Picked unit)

You are leaking a Unit Group and Point(s). Take a look here Things That Leak

Minor points (it would work without)
Every brackets pair () is a function call which slows down the execution (by the processor). It is insignificant for a single spell, or even 1000, but it is good practice to avoid them to some extend.

If you are using a fixed amount of healing you may leave it to the spell you have given to the dummy instead of triggering it.
If you want to customize it e.g. heal by intelligence of caster or something else, do it through trigger.
You may also consider using a special effect instead of a dummy unit + spell.

See what millzy has written about
  • Unit - A unit starts the effect of ability


Hope this helps!
-Ned
 
Level 3
Joined
Apr 18, 2018
Messages
58
@nedio95
I changed a trigger as You suggested and it works, I pick a target of ability and it heals everyone within the range. However, how would I be able to avoid Picking the target of spell, so it would just heal everyone within range?

I decided to use triggers, because I want this spell to heal on the amount of 10% of cater's max HP. Let's say he has 1000 HP, it heals 100. Just have no idea how to do it yet.

Thanks for the assistance.
 
Level 15
Joined
Jul 9, 2008
Messages
1,552
The idea of spell is to heal the caster and every unit within range of ability for 60/90/120/150/180 hp for every level of the ability.

I will certainly take a look into the leak tutorial.

Why are you adding life when the dummy ability your using adds life. Meaning what exactly, which line do You refer to?

  • Unit - set life of (Target of ability being cast) to (life of (Target of ability being cast) + 200
that altho "target of ability being cast" wont work for you here but that line and using the dummy unit with holly light to cast holly light on the unit will both heal the unit depending on what u have the heal amount set to in the object editor.

Also note that "target of ability being cast" only works with Single targeted spells. meaning this will not work for you.
 
Status
Not open for further replies.
Top