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

Move unit around the caster

Status
Not open for further replies.
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

What I want do:

- I want create mines around the caster. The mines have locust and the typical mines ability ( explode etc. ) The created mines should spin around the caster.


The problem:
- I can make the mines spin around the casterPOINT but if the caster is walking the mines should follow as well and still spin around <-- I can't get this so maybe someone can help me plz? :wsmile:

I create the mines with this:
  • Bomb 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Circle of Mines
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set AbilityLevel = ((Level of (Ability being cast) for (Triggering unit)) + 2)
      • For each (Integer A) from 1 to AbilityLevel, do (Actions)
        • Loop - Actions
          • Set TempArray[(Integer A)] = (TempPoint offset by (250.00 x (Real((Integer A)))) towards (Facing of (Triggering unit)) degrees)
          • Unit - Create 1 Land Mine for (Owner of (Triggering unit)) at TempArray[(Integer A)] facing (Position of (Triggering unit))
          • Custom script: call RemoveLocation(udg_TempArray[GetForLoopIndexA()])
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Level 22
Joined
Feb 3, 2009
Messages
3,292
Like this:
You just need to set the position of the caster in the start of the loop...


  • Bomb 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Circle of Mines
    • Actions
      • Set AbilityLevel = ((Level of (Ability being cast) for (Triggering unit)) + 2)
      • For each (Integer A) from 1 to AbilityLevel, do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of (Triggering unit))
          • Set TempArray[(Integer A)] = (TempPoint offset by (250.00 x (Real((Integer A)))) towards (Facing of (Triggering unit)) degrees)
          • Unit - Create 1 Land Mine for (Owner of (Triggering unit)) at TempArray[(Integer A)] facing (Position of (Triggering unit))
          • Custom script: call RemoveLocation(udg_TempArray[GetForLoopIndexA()])
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

Somehow I think only Pharaoh_ understand me, you other two dudes ...

A have a dummy ability based on Thunder Clap.

If Dr. Boom cast this ability (the ability has 4 levels) 3/4/5/6 mines should be created with a distance of 250/500/750 and so on...

Now the created mines should "spin around" Dr. Boom in a circle.

If Dr. Boom is walking the mines also should follow him and keep spinning around him.

EDIT: I got mines - that means - the mines that spin around him should explode if an enemy comes to close

This "Hell Circle" ... come on ... I understand nothing wtf ... isn't there any other way to get something like that? some easier ... or just that I can understand it -_-
I know I just can copy everything into my map but ...
 
Status
Not open for further replies.
Top