• 🏆 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!

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