• 🏆 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!

How do I make a summoned unit cast taunt?

Status
Not open for further replies.
Level 8
Joined
Jun 13, 2010
Messages
344
Hi I have made this trigger, which I can't really see should be any more difficult:

  • Watchers Eye
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoned unit)) Equal to Angel
    • Actions
      • Unit - Order (Summoned unit) to Night Elf Mountain Giant - Taunt
What happens?


And btw, how would you trigger an ability to heal another unit over time equal to an amount of the casters intelligence? Set life + int.. How?
The Angel is summoned from my ability and I have a Custom Taunt ability on the Angel. What goes wrong?
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
First of all, I usually use "Unit enters region" event, as that also detects when any unit enters the game (be it summoned unit or trained, etc.). I don't know how fast is the event you used (if the unit exists in the very moment the event fires). So try just changing the event and the condition from "...(summoned unit)..." to "...(Triggering unit)..." and see if it helps

Also, can you cast the spell without any problems? I mena does it require mana? and if so does your unit have mana? Or other things which could block the unit from using it.

As for your healing spell, it's quite simple and at the same time complicated. See, the simple thing is that intelligence is an integer number (number without decimal point), while health is a real number (number with decimal point), which mean you just have to convert that integer number into real number and sum both values together.
So to set the life of a unit works like this:
Set life of unit to ((life of unit) + I2R(intelligence of unit))
Notice those colors, they explain what you have to use and when. You have to set it in this order:
1) Red: Arithmetic (X + Y)
2) Click on X in the above arithmetic function
3) Green: Unit - Property of unit - choose health here
4) Click ok to get back to the arithmetic function
5) Blue: Choose Conversion - convert integer to real
6) Select what number you want to convert by clicking inside the function on the blue underlined Point-value of footman
7) Yellow: Choose here Hero - Hero Attribute
8) choose the correct attribute and correct unit, click OK on all windows.

If you did everything right, you should end up with something like this:
  • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Real((Intelligence of (Triggering unit) (Exclude bonuses)))))
Now that was the easy part. The hard part is that you will need to create a trigger which periodically does the above (periodically heals you). If you want this to be MUI (multiple units can cast this at the same time and the spell will still behave correctly) you will need to use indexing method and make the spell a bit more complicated.
 
Level 8
Joined
Jun 13, 2010
Messages
344
First of all, I usually use "Unit enters region" event, as that also detects when any unit enters the game (be it summoned unit or trained, etc.). I don't know how fast is the event you used (if the unit exists in the very moment the event fires). So try just changing the event and the condition from "...(summoned unit)..." to "...(Triggering unit)..." and see if it helps

Also, can you cast the spell without any problems? I mena does it require mana? and if so does your unit have mana? Or other things which could block the unit from using it.

I've done as you said and it casts the spell. But it seems like it doesn't have an effect on nearby enemies. If I just put the unit into the map and cast it manually tho, it works. Strange.

Now that was the easy part. The hard part is that you will need to create a trigger which periodically does the above (periodically heals you). If you want this to be MUI (multiple units can cast this at the same time and the spell will still behave correctly) you will need to use indexing method and make the spell a bit more complicated.

What is MUI? :)
 
Last edited by a moderator:
Level 24
Joined
Aug 1, 2013
Messages
4,657
The limit is not necessarily 8191.
In most cases this is because you need to store something in an array but a lot of spells are MUI to the limits of WC3.

Others may be MUI to the limit of much lower than 8191 because you require multiple instances per use or have other instances stored that are not used at that moment.

MUI is not a basic thing that you can solve by following a tutorial.
MUI is a property that a spell has or does not have.
The usual things that are required to make something MUI is to use indexing and global arrays.
 
Status
Not open for further replies.
Top