Angle Points

PooBucket

New Member
Reaction score
12
I've got a spell and I want it to send carrion swarms in different positions, basically like a pentagon shape. This is the trigger I've got and it works but it only shoots to the right of the caster. I also want to make flame strikes around the caster, like a fire ring but about 500 range outside of the caster.
Code:
Swarm of Darkness Lvl 1
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Swarm of Darkness 
        (Level of Swarm of Darkness  for (Casting unit)) Equal to 1
    Actions
        Unit - Create 1 Swarm of Darkness (Unit) for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
        Unit - Turn collision for (Last created unit) Off
        Unit - Add a 1.25 second Generic expiration timer to (Last created unit)
        Unit - Add Swarm of Darkness (Effect) to (Last created unit)
        Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm ((Position of (Casting unit)) offset by 500.00 towards 0.00 degrees)
        Unit - Create 1 Swarm of Darkness (Unit) for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
        Unit - Turn collision for (Last created unit) Off
        Unit - Add a 1.25 second Generic expiration timer to (Last created unit)
        Unit - Add Swarm of Darkness (Effect) to (Last created unit)
        Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm ((Position of (Casting unit)) offset by 400.00 towards 0.00 degrees)
        Unit - Create 1 Swarm of Darkness (Unit) for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
        Unit - Turn collision for (Last created unit) Off
        Unit - Add a 1.25 second Generic expiration timer to (Last created unit)
        Unit - Add Swarm of Darkness (Effect) to (Last created unit)
        Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm ((Position of (Casting unit)) offset by 300.00 towards 0.00 degrees)
        Unit - Create 1 Swarm of Darkness (Unit) for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
        Unit - Turn collision for (Last created unit) Off
        Unit - Add a 1.25 second Generic expiration timer to (Last created unit)
        Unit - Add Swarm of Darkness (Effect) to (Last created unit)
        Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm ((Position of (Casting unit)) offset by 200.00 towards 0.00 degrees)
        Unit - Create 1 Swarm of Darkness (Unit) for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
        Unit - Turn collision for (Last created unit) Off
        Unit - Add a 1.25 second Generic expiration timer to (Last created unit)
        Unit - Add Swarm of Darkness (Effect) to (Last created unit)
        Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm ((Position of (Casting unit)) offset by 100.00 towards 0.00 degrees)

Thanks for the help. :thup:
 

luke20054

New Member
Reaction score
3
Erm i'm not to sure about custom abilities but i do know if u use cluster rockets and then attack your self then the rockets will shoot in all directions, or u could just use fan of knives ability. . Any help?:p
 

PooBucket

New Member
Reaction score
12
I'm bad with variables as I've said in my posts...dunno how i live with it and btw what are really leaks... i know how to fix them usually just with variables. I don't really want cluster rockets or fan of knives. because fan of knives is each unit nearby gets hit and cluster rockets just dun really fit. do i put the angles in the degrees too?
 

PrisonLove

Hard Realist
Reaction score
78
first of all it may be easier to use an integer loop and then do something like this:

Code:
Actions
set temppoint = Position of Triggering Unit
For each integer A from 1 to 5 do actions
    loop actions
        create one dummy unit at temppoint
        add carrion swarm to Last Created unit
        add a 2 second generic expiration timer to Last Created Unit
        set temppoint2 = temppoint offset by 300 towards (Integer A X (360/5)) degrees
        order last created unit to undead dreadlord - carrion swarm temppoint2
Cutom Script: call RemoveLocation(udg_temppoint)
cutom Script: call RemoveLocation(udg_temppoint2)


that shoudl give you units that cast carrion swarm in a circle. (im not sure if it will be an exact pentagon). hope it helps and hope i didnt misunderstand
 

PooBucket

New Member
Reaction score
12
It still doesn't work, the carrion swarm only goes up once. Am I suppose to make 5 of those codes? (above)
 

PrisonLove

Hard Realist
Reaction score
78
if you included the removelocation functions inside of the loop then that would cause it to only cast once because you remove the location after the first cast and then on the subsequent cast there are no more temppoints so the units dont cast. move the removeloaction functions outside fo teh loop and then it should work.
 

PooBucket

New Member
Reaction score
12
Thanks PrisonLove! I did put the remove location in the loop so yeah, that's why it didn't work. The angles are good enough for a pentagon.
 

cleeezzz

The Undead Ranger.
Reaction score
268
you can use the same trigger prisonlove gave you for the ring of fire, just change Integer A 1 to (Amount of Flamestrikes you want around the caster)
and change the dummy skill obviously, and change offset to 500
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
Sure it will, you just need to adjust the number a bit.

Code:
For each (Integer A) from 1 to [B]72[/B], do (Actions)
    Loop - Actions
        Special Effect - Create a special effect at ((Center of (Playable map area)) offset by 500.00 towards ((Real((Integer A))) x 5.00) degrees) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
72*5 = 360
36 * 10 = 360
18 * 20 = 360
The number is how many flame strikes will appear.
 

PooBucket

New Member
Reaction score
12
Nah, I meant a separate ability making flame strikes around the caster, not just only special effects. Thanks for helping anyway.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top