Spell request(this ideia is very good!)

Kike

Member
Reaction score
3
Hi, I'm making a map and i have a new spell idea, but I haven't any idea how to do this! So I'm making a spell than is this: unit X cast a spell, unit X will creat some units like a normal summon but the locations of the units will change(like in Mirror Image) and when a unit attacks a fake unit X(summoned unit) the unit will cast another Mirror Image but it can't cast the Mirror Image just when It's attacked. If anyone can help me pliz post here. thx
 

hopy

Active Member
Reaction score
64
Well you'll have to trigger this with multiple triggers (3) I think.

I must say though, I do like your idea and I think it'll be fun to create. :)

Trigger 1: Mirror Image:
I think the best way of doing this is create a trigger that summons the units and afther that places them into a Unit_Group and starts a timer...
(If Mirror Image is cast: Create 4 Mirror Images and place (last created unit in Unit_Group) and set Timer X for 20 seconds).

Trigger 2: Dummy is attacked:
Afther that you'll need a trigger that causes the units to cast another Mirror Image spell when they're attacked.
(If Unit in Unit_Group is attacked created 1 Mirror Image and add (last created unit) to Unit_Group).

Trigger 3: Timer is over:
And maybe a trigger that kills all the Mirror Images and destroys the Unit Group afther the timer set in trigger 1 is finished.
(If Timer X is over kill every unit in Unit_Group and (call DestroyGroup (udg_Unit_Group))).

That's it in short.

For this you'll need:
- A Mirror Image ability based on War Stomp or something with 0 range and no targets / duration or damage. (Make sure it has a cooldown higher than 20 please).
- A Mirror Image unit that looks the same as the hero that has the ability.

- A Unit group variable
- A Timer variable
- 2 Point Variables

It's imposible to make exact copies of the hero though. They will NOT have the same mana, health, attack and such because they're units and dont have the same stats as the hero on every level with the same items.
The only way you can get the summoned units have the same health, mana and stuff is create Hero units that have the same stats and items as the hero, but than the player will get about 30 Hero buttons at the left side of his screen and I doubt he'll like that. :p
So I hope you're ok with that. Just normal units that look the same but have different health and mana and stuff and are just there to confuse, but enemie players will still be able to figure out who the real one is.

Also it's imposible to do this using the normal Mirror Image because you cant detect the Images in triggers.

I will post the trigger in a moment.

-------------EDIT------------------
Alright, I made the Trigger and this is what it looks so far:
Trigger:
  • Mass Mirror Image
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mass Mirror Image
    • Actions
      • Set Point = (Position of (Triggering unit))
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Set Point2 = (Point offset by 200.00 towards (90.00 x (Real((Integer A)))) degrees)
          • Unit - Create 1 Mirror Image Unit for (Owner of (Triggering unit)) at Point2 facing Default building facing degrees
          • Unit Group - Add (Last created unit) to Unit_Group
          • Custom script: call RemoveLocation (udg_Point2)
      • Countdown Timer - Start TimerX as a One-shot timer that will expire in 20.00 seconds
      • Custom script: call RemoveLocation (udg_Point)


Trigger:
  • Mass Mirror Image Attacked
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) is in Unit_Group) Equal to True
    • Actions
      • Set Point = (Position of (Attacked unit))
      • For each (Integer A) from 1 to 2, do (Actions)
        • Loop - Actions
          • Set Point2 = (Point offset by 200.00 towards (180.00 x (Real((Integer A)))) degrees)
          • Unit - Create 1 Mirror Image Unit for (Owner of (Attacked unit)) at Point2 facing Default building facing degrees
          • Unit Group - Add (Last created unit) to Unit_Group
          • Custom script: call RemoveLocation (udg_Point2)
      • Custom script: call RemoveLocation (udg_Point)


Trigger:
  • Mass Mirror Image Kill
    • Events
      • Time - TimerX expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Unit_Group and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • Custom script: call DestroyGroup (udg_Unit_Group)

I might make a few small changes to it later but it should be leak free and working so far. :p

That was alot less work than I thought.... Alright, I've tested it andddd ... ... ... It works perfectly...
I thought it didn't work while testing it... but that was because I'm using my own map when testing this... and my map has a trigger that uses Unit_Group every 0.5 seconds, so it got overwritten every time... lol.


One thing I'd like to add, don't give the Images to much attack power, the spell will be very overpowered. :p
And maybe you could add some small animations when a unit is summoned or something to make it look better.
 

Kike

Member
Reaction score
3
Thank you very much! it is incrible!:eek: now i will try to make cooldows or it will be mad. thank you again:thup:
 

hopy

Active Member
Reaction score
64
No problem. :)
Let me know if there are any problems or if you want to add anything and I'll see what I can do.
 
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