Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Artillery control item?
#14
I use dummies which cast cluster rocket 2000 range from the target point where you aim, and also dummies is at a 3000 height. The angle you can decide yourself. The angle 0.40 is good. Also them the projectile comes from a great height and looks good, without any unnecessary lagg. Also you can apply stun and damage from the cluster based dummy spell as well... and any effect you want.

Since cluster rocket always uses 0.75 seconds to reach target point no matter range, it makes it predicable to apply the damage with 0.75 delay. I use a dummy using fan of knifes with casting delay of 0.75 sec since it's more reliable then using the wait 0.75 function.

Code:
Artillery Strike (item)
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Artillery Strike
    Actions
        Set TempPoint2 = (Target point of ability being cast)
        Set TempPoint1 = (TempPoint2 offset by 2000.00 towards ((Facing of (Triggering unit)) - 180.00) degrees)
        Set Artillery_Point[(Player number of (Owner of (Triggering unit)))] = (Target point of ability being cast)
        Set TempPoint3 = (TempPoint2 offset by (Random real number between 55.00 and 588.00) towards (Random angle) degrees)
        Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TempPoint1 facing 180.00 degrees
        Unit - Add Crow Form to (Last created unit)
        Animation - Change (Last created unit) flying height to 3500.00 at 0.00
        Unit - Add a 11.00 second Generic expiration timer to (Last created unit)
        Unit - Add Artillery Strike (Dummy Cast) to (Last created unit)
        Unit - Order (Last created unit) to Neutral Tinker - Cluster Rockets TempPoint3
        Set ArtilleryDelayLevel[(Player number of (Owner of (Triggering unit)))] = (ArtilleryDelayLevel[(Player number of (Owner of (Triggering unit)))] - 7)
        Custom script:   call RemoveLocation(udg_TempPoint3)
        Custom script:   call RemoveLocation(udg_TempPoint1)
        Custom script:   call RemoveLocation(udg_TempPoint2)
        Sound - Play GlueScreenMeteorLaunch2 <gen>
        Wait 1.20 seconds
        Sound - Play GlueScreenMeteorLaunch3 <gen>
        Wait 1.20 seconds
        Sound - Play GlueScreenMeteorLaunch1 <gen>
You see, I also did add artillery flying sounds, so the opponents kinda get a warning about a incoming artillery bombardment.

Code:
Artillery Impact
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Ability being cast) Equal to Artillery Strike (Dummy Cast)
                (Ability being cast) Equal to Artillery Strike (Fast Cast)
    Actions
        Set TempPoint1 = (Target point of ability being cast)
        Set TempPoint2 = (Position of (Triggering unit))
        Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TempPoint1 facing 180.00 degrees
        Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
        Unit - Add Artillery Strike (250) to (Last created unit)
        Unit - Order (Last created unit) to Night Elf Warden - Fan Of Knives
        Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TempPoint1 facing 180.00 degrees
        Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
        Unit - Add Artillery Strike (450) to (Last created unit)
        Unit - Order (Last created unit) to Night Elf Warden - Fan Of Knives
        Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TempPoint1 facing 180.00 degrees
        Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
        Unit - Add Artillery Strike (450 Struc) to (Last created unit)
        Unit - Order (Last created unit) to Night Elf Warden - Fan Of Knives
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ArtilleryDelayLevel[(Player number of (Owner of (Triggering unit)))] Less than 0
            Then - Actions
                Set ArtilleryDelayLevel[(Player number of (Owner of (Triggering unit)))] = (ArtilleryDelayLevel[(Player number of (Owner of (Triggering unit)))] + 1)
            Else - Actions
                Custom script:   call RemoveLocation(udg_TempPoint1)
                Custom script:   call RemoveLocation(udg_TempPoint2)
                Skip remaining actions
        Set TempPoint3 = (Artillery_Point[(Player number of (Owner of (Triggering unit)))] offset by (Random real number between 55.00 and 588.00) towards (Random angle) degrees)
        Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TempPoint2 facing (Angle from TempPoint2 to TempPoint1) degrees
        Unit - Add Crow Form to (Last created unit)
        Animation - Change (Last created unit) flying height to 3500.00 at 0.00
        Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
        Unit - Add Artillery Strike (Fast Cast) to (Last created unit)
        Unit - Order (Last created unit) to Neutral Tinker - Cluster Rockets TempPoint3
        Custom script:   call RemoveLocation(udg_TempPoint3)
        Custom script:   call RemoveLocation(udg_TempPoint2)
        Custom script:   call RemoveLocation(udg_TempPoint1)

Code:
Artillery Effect
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Artillery Strike (250)
    Actions
        Set TempPoint1 = (Position of (Triggering unit))
        Special Effect - Create a special effect at TempPoint1 using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
        Special Effect - Destroy (Last created special effect)
        Unit - Create 1 Dummy Bomb for (Owner of (Triggering unit)) at TempPoint1 facing Default building facing degrees
        Animation - Change (Last created unit)'s size to (280.00%, 280.00%, 280.00%) of its original size
        Animation - Change (Last created unit)'s animation speed to 39.00% of its original speed
        Unit - Kill (Last created unit)
        Custom script:   call RemoveLocation(udg_TempPoint1)

This is how I did it with the artillery item.

I'm quite sure you can make it better than I did. I got 1 point leak cuz I can't remove the target point of random strikes to be calculated from.

I use up to 12 arrays, cuz in my map mod, I have a artillery AI, so the force can cast the spell.
Reply


Messages In This Thread
Artillery control item? - by TKF - 2008-08-23, 21:21:27
Re: Artillery control item? - by Althend - 2008-08-23, 22:37:35
Re: Artillery control item? - by TKF - 2008-08-24, 03:09:38
Re: Artillery control item? - by k-bones - 2008-08-24, 12:25:33
Re: Artillery control item? - by TKF - 2008-08-24, 22:04:58
Re: Artillery control item? - by k-bones - 2008-08-25, 17:28:25
Re: Artillery control item? - by Gammagulp - 2008-08-26, 18:18:22
Re: Artillery control item? - by k-bones - 2008-08-27, 08:30:26
Re: Artillery control item? - by TKF - 2008-08-27, 14:23:33
Re: Artillery control item? - by k-bones - 2008-08-27, 15:02:01
Re: Artillery control item? - by TKF - 2008-08-27, 16:00:28
Re: Artillery control item? - by Gammagulp - 2008-08-27, 19:19:25
Re: Artillery control item? - by Exodus - 2008-08-28, 17:30:39
Re: Artillery control item? - by TKF - 2008-08-28, 18:03:47
Re: Artillery control item? - by TKF - 2008-10-24, 01:15:01
Re: Artillery control item? - by qweqqweq - 2008-10-24, 21:42:15
Re: Artillery control item? - by RikonVan - 2008-10-26, 14:23:12
Re: Artillery control item? - by TKF - 2008-10-27, 05:22:00
Re: Artillery control item? - by TKF - 2009-05-23, 20:48:26
Re: Artillery control item? - by Exodus - 2009-05-24, 01:36:29

Possibly Related Threads…
Thread Author Replies Views Last Post
  Control Points BENNIE.FM 1 2,530 2014-04-14, 23:15:39
Last Post: Exodus
Rainbow Backpack item? gozo1985 4 5,162 2014-01-12, 02:52:21
Last Post: BtankNoob
  New item idea: Titanium Hull psycodiver 8 7,481 2014-01-12, 02:49:37
Last Post: BtankNoob
  Item Buy Hotkeys Exodus 8 8,879 2012-11-30, 12:58:40
Last Post: AeroniumX
  New Item Wupti 10 10,928 2012-09-03, 01:26:23
Last Post: Wupti



Users browsing this thread: 3 Guest(s)