• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

[Trigger] Multishot (not 100% normal)

Status
Not open for further replies.
Level 3
Joined
Jun 23, 2007
Messages
28
I've been working on what some may think of as an normal Multishot, but I haven't found any others before that's exactly like this.

Anyhow, the point is for the hero to target an area of 400 then the unit should fire N amount of arrowns at random targets inside the 'aim'.

I thought it must be easy to do so I went with what I thought was the easiest idea but I can't get it to work, anyone see what might be wrong? :
  • Multishot
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Multishot (Normal)
    • Actions
      • Set MultishotCaster = (Casting unit)
      • Unit Group - Add all units of (Random ((Level of Multishot (Normal) for MultishotCaster) x 2) units from (Units within 200.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Owner of MultishotCaster)) Equal to True))) to MultishotUnitGroup
      • Unit - Create 1 Dummy (Multishot) for (Owner of MultishotCaster) at (Position of MultishotCaster) facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Turn collision for (Last created unit) Off
      • Unit - Move (Last created unit) instantly to (Position of MultishotCaster)
      • Unit Group - Pick every unit in MultishotUnitGroup and do (Actions)
        • Loop - Actions
          • Unit - Order (Last created unit) to Attack Once (Picked unit)
          • Unit - Cause MultishotCaster to damage (Picked unit), dealing ((Real((Agility of MultishotCaster (Include bonuses)))) x 3.00) damage of attack type Hero and damage type Normal
The Dummy is a modified Troll Headhunter with no animation etc. It also has 0 (maximum) attackspeed and also all animationsetting have been set to work with this, such as 'Cast backswing' etc.

Anyone see what might be wrong (I promise it's a noobish error)?
 
Level 10
Joined
Jan 21, 2007
Messages
576
Here i wipped up a trigger for you that should do what you need:

  • Multi Shot
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Set L = (Target point of ability being cast)
      • Set UG_DB = (Random ((Level of Animate Dead for (Casting unit)) x 2) units from (Units within [COLOR="Red"]400.00[/COLOR]of L matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)))
      • Custom script: call RemoveLocation(udg_L)
      • Unit Group - Pick every unit in UG_DB and do (Actions)
        • Loop - Actions
          • Set L = (Position of (Casting unit))
          • Unit - Create 1 Footman for (Owner of (Casting unit)) at L facing Default building facing degrees
          • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_L)
          • Unit - Order (Last created unit) to DummyUnitAbility (Picked unit)
Set the red 400.00 to the same area of effect the hero ability has. Make the Missile Art
of the dummy's ability to what you want the multishots to look like.

Tip on dummies case you dont know: Make them flying, Have the abilites Locust/Invulnerable.
Set the collision size to 0. And set the model to .mdl (the part where you can type in the path of the model)
 
Level 3
Joined
Jun 23, 2007
Messages
28
I've done all the things you showed me, a few things were new but it was basicly the same as my old version. It works and the enemy takes damage, the only problem is that I don't see the projectiles :/ (And yes, I've selected art for the 'missiles').
 
Level 10
Joined
Jan 21, 2007
Messages
576
Make sure to set the missile art speed to 1500 and turn Missile Homing Enabled to True. ;) You should be good to go.
 
Level 3
Joined
Jun 23, 2007
Messages
28
Still doesn't work. I can't see any projectiles. I've modified the code though since it wouldn't work if there were less units than ((Level of Multishot (Normal) for MultishotCaster) x 2). This is how it looks like now:
  • Multishot
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Multishot (Normal)
    • Actions
      • Set MultishotCaster = (Casting unit)
      • Unit - Create 1 Dummy (Multishot) for (Owner of MultishotCaster) at (Position of MultishotCaster) facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Turn collision for (Last created unit) Off
      • Unit - Move (Last created unit) instantly to (Position of MultishotCaster)
      • Custom script: set bj_wantDestroyGroup =true
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units within 200.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Owner of MultishotCaster)) Equal to True))) Less than ((Level of Multishot (Normal) for MultishotCaster) x 2)
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 200.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Owner of MultishotCaster)) Equal to True)) and do (Actions)
            • Loop - Actions
              • Unit - Order (Last created unit) to Attack Once (Picked unit)
              • Unit - Cause MultishotCaster to damage (Picked unit), dealing ((Real((Agility of MultishotCaster (Include bonuses)))) x 3.00) damage of attack type Hero and damage type Normal
        • Else - Actions
          • Unit Group - Pick every unit in (Random ((Level of Multishot (Normal) for MultishotCaster) x 2) units from (Units within 200.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Owner of MultishotCaster)) Equal to True))) and do (Actions)
            • Loop - Actions
              • Unit - Order (Last created unit) to Attack Once (Picked unit)
              • Unit - Cause MultishotCaster to damage (Picked unit), dealing ((Real((Agility of MultishotCaster (Include bonuses)))) x 3.00) damage of attack type Hero and damage type Normal
I've changed too missile art speed to 1500 and Missile Homing Enabled to True. Can't understand why it won't work :/
 
Level 10
Joined
Jan 21, 2007
Messages
576
Alright got it. This is the exact spell i am using in my map except in my map i didnt base it off blizzard.
 

Attachments

  • Tri-Shot.w3x
    13.9 KB · Views: 69
Last edited:
Level 3
Joined
Jun 23, 2007
Messages
28
Thanks a lot, that worked perfectly when I based the dummy spell on firebolt. I guess that was what was missing. Truly thankful :)
 
Level 4
Joined
Jun 5, 2007
Messages
65
Haha I guess I'm a little late in saying this, but you could've just used the rocket cluster ability (the Goblin Tinker), changed the art to an arrow, etc.
So.. yeah, consider it guess.
-Z
 
Level 10
Joined
Jan 21, 2007
Messages
576
Nope you coulnt, becuase he wanted it to actualy TARGET three random units : /.
 
Status
Not open for further replies.
Top