- Joined
- Oct 28, 2005
- Messages
- 6
Howzit. I need some help with two of my trigger spells. If you were by any chance browsing in the spell download sections, you may have seen my spells there, but it was requested that i rather ask for help in the forums.
So anyway, i need help with some triggers in my spells.
The first spell's problem is like this:
The spell has to create a square wall around the area of the casting unit. I'm using this:
Set TGBorderPoints[1] = ((Position of (Casting unit)) offset by (-1000.00, 1000.00))
Set TGBorderPoints[2] = ((Position of (Casting unit)) offset by (1000.00, 1000.00))
Set TGBorderPoints[3] = ((Position of (Casting unit)) offset by (1000.00, -1000.00))
Set TGBorderPoints[4] = ((Position of (Casting unit)) offset by (-1000.00, -1000.00))
For each (Integer A) from 1 to 7, do (Destructible - Create a Stone Wall (Horizontal) at (TGBorderPoints[1] offset by (((Distance between TGBorderPoints[1] and TGBorderPoints[2]) / 7.00) x (Real((Integer A)))) towards (Angle from TGBorderPoints[1] to TGBorderPoints[2]) degrees) facing 270.00 wit
For each (Integer A) from 1 to 7, do (Destructible - Create a Stone Wall (Horizontal) at (TGBorderPoints[3] offset by (((Distance between TGBorderPoints[3] and TGBorderPoints[4]) / 7.00) x (Real((Integer A)))) towards (Angle from TGBorderPoints[3] to TGBorderPoints[4]) degrees) facing 270.00 wit
For each (Integer A) from 1 to 7, do (Destructible - Create a Stone Wall (Vertical) at (TGBorderPoints[2] offset by (((Distance between TGBorderPoints[2] and TGBorderPoints[3]) / 7.00) x (Real((Integer A)))) towards (Angle from TGBorderPoints[2] to TGBorderPoints[3]) degrees) facing 0.00 with sc
For each (Integer A) from 1 to 7, do (Destructible - Create a Stone Wall (Vertical) at (TGBorderPoints[1] offset by (((Distance between TGBorderPoints[1] and TGBorderPoints[4]) / 7.00) x (Real((Integer A)))) towards (Angle from TGBorderPoints[1] to TGBorderPoints[4]) degrees) facing 270.00 with
Now, the problem is that this wall doesn't wanna line up properly. Any ideas? What have i done wrong?
The Second spell's problem is this:
This is a corpse explosion spell that deals damage based on the level of the spell and the corpses maximum health. (note that the spell has 6 levels.) Now, this is what i'm using:
Unit Group - Pick every unit in (Units within 600.00 of GCEPoint matching (((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True)) and do (Actions)
Loop - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - ((Max life of GCETarget) / (100.00 / (90.00 / (7.00 - (Real((Level of Grand Corpse Explosion Old for GCECaster))))))))
I'm using this next one as the secondary damage:
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - ((Max life of GCETarget) / (100.00 / (60.00 / (7.00 - (Real((Level of Grand Corpse Explosion Old for GCECaster))))))))
So anyway, i need help with some triggers in my spells.
The first spell's problem is like this:
The spell has to create a square wall around the area of the casting unit. I'm using this:
Set TGBorderPoints[1] = ((Position of (Casting unit)) offset by (-1000.00, 1000.00))
Set TGBorderPoints[2] = ((Position of (Casting unit)) offset by (1000.00, 1000.00))
Set TGBorderPoints[3] = ((Position of (Casting unit)) offset by (1000.00, -1000.00))
Set TGBorderPoints[4] = ((Position of (Casting unit)) offset by (-1000.00, -1000.00))
For each (Integer A) from 1 to 7, do (Destructible - Create a Stone Wall (Horizontal) at (TGBorderPoints[1] offset by (((Distance between TGBorderPoints[1] and TGBorderPoints[2]) / 7.00) x (Real((Integer A)))) towards (Angle from TGBorderPoints[1] to TGBorderPoints[2]) degrees) facing 270.00 wit
For each (Integer A) from 1 to 7, do (Destructible - Create a Stone Wall (Horizontal) at (TGBorderPoints[3] offset by (((Distance between TGBorderPoints[3] and TGBorderPoints[4]) / 7.00) x (Real((Integer A)))) towards (Angle from TGBorderPoints[3] to TGBorderPoints[4]) degrees) facing 270.00 wit
For each (Integer A) from 1 to 7, do (Destructible - Create a Stone Wall (Vertical) at (TGBorderPoints[2] offset by (((Distance between TGBorderPoints[2] and TGBorderPoints[3]) / 7.00) x (Real((Integer A)))) towards (Angle from TGBorderPoints[2] to TGBorderPoints[3]) degrees) facing 0.00 with sc
For each (Integer A) from 1 to 7, do (Destructible - Create a Stone Wall (Vertical) at (TGBorderPoints[1] offset by (((Distance between TGBorderPoints[1] and TGBorderPoints[4]) / 7.00) x (Real((Integer A)))) towards (Angle from TGBorderPoints[1] to TGBorderPoints[4]) degrees) facing 270.00 with
Now, the problem is that this wall doesn't wanna line up properly. Any ideas? What have i done wrong?
The Second spell's problem is this:
This is a corpse explosion spell that deals damage based on the level of the spell and the corpses maximum health. (note that the spell has 6 levels.) Now, this is what i'm using:
Unit Group - Pick every unit in (Units within 600.00 of GCEPoint matching (((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True)) and do (Actions)
Loop - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - ((Max life of GCETarget) / (100.00 / (90.00 / (7.00 - (Real((Level of Grand Corpse Explosion Old for GCECaster))))))))
I'm using this next one as the secondary damage:
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - ((Max life of GCETarget) / (100.00 / (60.00 / (7.00 - (Real((Level of Grand Corpse Explosion Old for GCECaster))))))))