• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Spell not working

Status
Not open for further replies.
Level 8
Joined
Mar 12, 2008
Messages
437
[Solved] Spell not working

Good morning.

  • Reducing Blast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Reducing Blast
    • Actions
      • Set Point[1] = (Position of (Casting unit))
      • Unit Group - Pick every unit in (Units within (200.00 + (30.00 x (Real((Level of (Ability being cast) for (Casting unit)))))) of Point[1]) and do (Actions)
        • Loop - Actions
          • Set Point[2] = (Position of (Picked unit))
          • Unit - Create 1 Dummy erwgfarewgr for (Owner of (Casting unit)) at Point[2] facing Default building facing degrees
          • Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
This trigger is not working properly.

First of all, I don't want any replies about fixing the leaks/fixing the damage/killing the units/etc. I know that I have not fixed the leaks/fixed the damage/killed the units/etc. I will do that later as this starts working. Now,

I'm making a Thunder Clapish spell. What it does is deal damage to enemies around the caster as well as giving them a negative Inner Fire buff, reducing armour and attack damage.

It's not working. What the trigger currently does is create as many dummy units that are picked, and one dummy gives one unit the buff. The other dummies don't do anything.

Does anyone know how to make all units recieve the buff? Any aid would be appreciated.

And now, for an explanation of all the things:
Reducing Blast - The Thunder Clapish spell. Based off Channel.
Dummy - The dummy unit, already has "Inner Fire".
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
Probably a problem with (Last created unit), check its values to see if it is changing for each time it loops.

If that was not the problem, it must be due to the dummies having their orders interupted as they are being displaced. Give the dummies the locust ability and make their movement type none so they do not colide with anyone / anything.
 
Level 8
Joined
Mar 12, 2008
Messages
437
OK, I'll try that.

Edit I: No difference. They initally had locust, but I removed it and made the model visible to check what was wrong.

Edit II: I also tried to store the units into a variable, no happenings there either
 
Last edited:
Level 8
Joined
Mar 12, 2008
Messages
437
Try and use acid bomb maybe?? Just create a dummy unit and order it to cast that on the point of caster. That already has AOE and it reduces armor.

I want it to reduce attack damage too, so it won't work.

Have you made sure it can currently target the affected units?
Afterall it will be picking both friend and foe including the caster and thus you need to make sure that the spell can be cast on everyone (both friend and foe).

I currently have it on Air, Ground, Neutral, Enemy. I'll try to remove enemy and see what happens.

Edit: Nothing improved when I removed enemy or neutral. I'll keep the targets the same way.

I tried changing the unit group action to "Unit Group - Pick every unit in (Units within (200.00 + (30.00 x (Real((Level of Reducing Blast for (Casting unit)))))) of Point[1] matching (((Owner of (Matching unit)) is an ally of (Owner of (Casting unit))) Equal to False)) and do (Actions)"

However, now only one dummy spawns even though there are more than one enemy around the caster. By the way, Point[1] = position of casting unit. :|

Edit2: Now I changed the unit pick action to the original one, but with an "if/then/else" too, and that puts us back with the "multiple dummies appear, but only one's casting" problem.
 
Last edited:

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
Does the dummys have the inner ability to cast it or u are ordering them to cast NOTHING it happens stupid mistakes :p TRY to give them the abilitie

If it does not work give them some mana like 1000 to be abel to cast the given ability
 
Level 8
Joined
Mar 12, 2008
Messages
437
The dummies have the ability from start. The ability doesn't require any mana. I think I'm doing what everyone says I should, but I can check anyway.

Attach'd
 

Attachments

  • BaloneySandwichesAreTasty.w3x
    44.6 KB · Views: 88
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
(Casting unit) is unreliable it seems inside unit loops and quickly loses its value, thus why your spell is not working. When I stored the casting unit in a variable it worked fine. This is because of the way they are executed. Anyway, it is recommendable for efficency to store stuff in variables afterall natives are slower than variables, epseically BJ GUI ones.
 
Status
Not open for further replies.
Top