• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Unit is nearly of a other unit...

Status
Not open for further replies.
Level 4
Joined
Jan 30, 2012
Messages
61
Hello,

I have a problem:
I wanna to do a skill which is creating a unit with a sensor, if a unit is going in a AoE of 300 of the unit, it shall create a dummy unit and this dummy unit shall cast a dummy skill

i can all of them, without the Sensor (Activate the Trap if a unit comes nearly of the Unit)

I hope anyone can help me :)
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
Here ya go!

  • Skill
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set UnitGroup1 = (Units within 300.00 of YourPoint)
      • Unit Group - Pick every unit in UnitGroup1 and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is in UnitGroup2 Equal to False
            • Then - Actions
              • Unit - Cause YourUnit to damage (Picked unit), dealing 50.00 damage of attack type Spells and damage type Normal
              • Unit Group - Add (Picked unit) to UnitGroup2
            • Else - Actions
The UnitGroup2 exists because otherwise the unit will get damaged every 0.03 seconds. This way, the unit will be damaged only when it enters the 300 AoE for the first time.
 
Level 4
Joined
Jan 30, 2012
Messages
61
Ok listen i willl tell you exactly about the unit:

Its like a mine
I has a sensor if a unit is nearly of it (example 300 AoE) it will create a dummy unit which is casting a dummy skill (Stormbolt but changed Modell) to the unit who are nearly of the mine. (Victim)
The mine has 4 mana (Charges) and everytime if a unit (Victim) is nearly of the mine and get attacked by the mine, the mine lose 1 mana...if it has 0 mana...it will destroyed... But in my game are 10 player so everyone can create this unit...so the trigger shall work for many players....
 
Level 4
Joined
Jan 30, 2012
Messages
61
Oh i found a easy way :D

  • IMS Detector
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Attacked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
          • (Unit-type of (Attacking unit)) Equal to I.M.S.
    • Actions
      • Unit - Create 1 I.M.S. Dummy for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
      • Animation - Change (Last created unit) flying height to 350.00 at 350.00
      • Wait 1.00 seconds
      • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Attacked unit)
      • Unit - Set mana of (Attacking unit) to ((Mana of (Attacking unit)) - 1.00)
      • Wait 0.25 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Mana of (Attacking unit)) Equal to 0.00
        • Then - Actions
          • Unit - Kill (Attacking unit)
          • Special Effect - Create a special effect at (Position of (Attacking unit)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        • Else - Actions

But now i have a new small problem, i did that the unit has locust, so nobody can click it, but it has a damage of 1-1 (it dont looks professional)....so can i hide the attack?? i did it one time but i dont know how i did that :goblin_cry: but i did it without triggers, just with the Object-Edtitor...
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
but it works.... :D
but it's not mui... :D

Use Hanky's indexing system. It's really easy to use. You don't even need to understand the system, just copy-paste some things and make all your variables with array. The array is the same for all of your variables. There is a lot of description in it's test map. :) You can take a look at my spells (in my signature). They are made with that system! :)
 
Level 4
Joined
Jan 30, 2012
Messages
61
Waz the fuck ! your spells are cool but its not easy for me :D you did for everything a Variable :D
I have another Question:

  • Artillery Barrage Call
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Artillery Barrage [|cffFF0000E|r]
    • Actions
      • Game - Display to (All players) for 5.00 seconds the text: (|cff00ff00 + ((Name of (Owner of (Triggering unit))) + calls an artillery barrage|r))
      • Unit - Create 1 Artillery Barrage Anzeige for (Owner of (Triggering unit)) at (Target point of ability being cast) facing Default building facing degrees
      • Wait 2.50 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
      • Wait 0.10 seconds
      • Unit - Create 1 Artillery Barrage for (Owner of (Triggering unit)) at ((Target point of ability being cast) offset by (Random real number between 0.00 and 350.00) towards (Random real number between 0.00 and 360.00) degrees) facing Default building facing degrees
it dont creates the Artillery Barrage unit at the target point of my skill... it create them at Center of the Map.... why???
 
Level 17
Joined
Jul 17, 2011
Messages
1,863
depends on what spell you are using for your dummy spell if its a spell where you dont have a target (war stomp, thunder clap) then it will set the location to null and just go to center of map area make shure you are using a target ability such as flame strike, shockwave or whatever gives you the little blue aim thing
if you doubt it just remove the condition and then check your spell and see what it does

and this spell looks very bad because of all the waits use loops instead if you dont know about variables and loops you might want to quit making spells and go to some of the tutorials and look at other people's work :vw_unimpressed:
 
Level 4
Joined
Jan 30, 2012
Messages
61
i used everytime this way for my spells and they worked... ^_^
The Artillery Barrage skill from the hero is a Point skill like Far Sight...
 
Status
Not open for further replies.
Top