• 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.

Help with dummies!

Status
Not open for further replies.
Level 3
Joined
Jan 1, 2006
Messages
15
I'm having a little trouble hwith a spell I'm trying to make and I was hoping that someone could lend a hand...

What I'm trying to do is use a summon ability as the event which triggers the following:

Code:
    Events
        Unit - A unit Spawns a summoned unit
    Conditions
        (Unit-type of (Triggering unit)) Equal to Water Elemental (Level 1)
    Actions
        Game - Display to (All players) the text: Summoned Units
        Wait 0.10 seconds
        For each (Integer A) from 1 to 8, do (Actions)
            Loop - Actions
                Unit - Create 1 Water Elemental (Level 1) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
                Unit - Add a 6.00 second Generic expiration timer to (Last created unit)
                Set Missle1[(Integer A)] = (Last created unit)
                Unit - Move Missle1[(Integer A)] instantly to ((Position of Archmage 0000 <gen>) offset by 100.00 towards Position degrees)
                Unit - Create 1 Frog for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
                Unit - Add a 6.00 second Generic expiration timer to (Last created unit)
                Set Target[(Integer A)] = (Last created unit)
                Unit - Move Target[(Integer A)] instantly to ((Position of Archmage 0000 <gen>) offset by 500.00 towards Position degrees)
                Set Position = (Position + 45.00)
        Set Position = 0.00
        For each (Integer B) from 1 to 8, do (Actions)
            Loop - Actions
                For each (Integer A) from 1 to 8, do (Actions)
                    Loop - Actions
                        Wait 0.10 seconds
                        Unit - Order Missle1[(Integer A)] to Attack Ground (Position of Target[(Integer A)])
                        Unit - Move Missle1[(Integer A)] instantly to ((Position of Archmage 0000 <gen>) offset by 100.00 towards Position degrees)
                        Unit - Move Missle1[(Integer A)] instantly to ((Position of Archmage 0000 <gen>) offset by 100.00 towards Position degrees)
                Set Position = (Position + 20.00)
What this should do, is create dummy units that fire slow flying missles (speed of 300, normal damage, splash of 150,225,300) in sort of a spiraling pattern. The thing is, that the first volley comes out ok, at least it looks like it's going to work, but the next several repositionings (Variable B) don't seem to go into effect.

Now I had to use dummy neutral hostiles or else they wouldn't fire at all... am I approaching this the wrong way? Are values over 360 not recognized for polar offset? (If so I can figure out the if/then that I need, which I might try after this post.) Do I need one of those stupid waits? Thanks for your help on this.
 
Level 3
Joined
Jan 1, 2006
Messages
15
Daelin said:
That's because (Triggering Unit) for this event applies for the unit SUMMONING (ex: the Archmage). To refer to the Water Elemental use the (Summoned Unit) event-response.

~Daelin

I'm sorry for bumping this... but THANKS A TON!!! I just searched thru my posts and I didn't realize you answered this for me!!! TYVM!!!
 
Status
Not open for further replies.
Top