Below Ill put part of a code of what Im trying to do.. Summoning 4 dummies each facing at each direction (N,S,E,W) i want them to cast and impale type spell directly infront of them but not whats not right (probably the offset, not sure how to work offset). help is much appreciated
Ice star
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Ice Star
Actions
Set Icestarcaster = (Casting unit)
Unit - Pause Icestarcaster
Unit - Create 1 Ice Star Dummy for (Owner of Icestarcaster) at (Position of Icestarcaster) facing 90.00 degrees
Set Icestardummy[1] = (Last created unit)
Unit - Create 1 Ice Star Dummy for (Owner of Icestarcaster) at (Position of Icestarcaster) facing 0.00 degrees
Set Icestardummy[2] = (Last created unit)
Unit - Create 1 Ice Star Dummy for (Owner of Icestarcaster) at (Position of Icestarcaster) facing 180.00 degrees
Set Icestardummy[3] = (Last created unit)
Unit - Create 1 Ice Star Dummy for (Owner of Icestarcaster) at (Position of Icestarcaster) facing 270.00 degrees
Set Icestardummy[4] = (Last created unit)
Wait 0.30 seconds
Unit - Order Icestardummy[1] to Undead Crypt Lord - Impale ((Position of Icestarcaster) offset by 256.00 towards 90.00 degrees)
Unit - Order Icestardummy[2] to Undead Crypt Lord - Impale ((Position of Icestarcaster) offset by 256.00 towards 0.00 degrees)
Unit - Order Icestardummy[3] to Undead Crypt Lord - Impale ((Position of Icestarcaster) offset by 256.00 towards 180.00 degrees)
Unit - Order Icestardummy[4] to Undead Crypt Lord - Impale ((Position of Icestarcaster) offset by 256.00 towards 270.00 degrees)
When you play hide&seek with your friends, and they tell you to count to 10, you dont start at 0, do you? (just pointing out that for the sake of clarity its better to start with 1, even though the 0 can be used too)
On the other hand, when you play Write the JASS with your friends, you dont use BJs if you're trying to write efficient code, do you?
There is absolutely no reason to start at 1 . Well, you can, its just... meh, get used to starting at 0 . Basically everything does, and anyways, when you get into real programming (if you do, that is), then that 0 will make a large difference in memory allocation.
thanks for the help but just to clarify, i have the spell on the units. but maybe something with the string activation is wrong. the way i have it 256 offset with 0 degrees should cause it to cast directly infront of the unit? or do i have to set the degrees as the point it is facing
It should work. Maybe you're removing the units before they can finish the spell, or maybe your impale itself is messed up. Also, make sure your impale's orderstring is "impale"
PurplePootOn the other hand, when you play Write the JASS with your friends, you dont use BJs if you're trying to write efficient code, do you?
There is absolutely no reason to start at 1 . Well, you can, its just... meh, get used to starting at 0 . Basically everything does, and anyways, when you get into real programming (if you do, that is), then that 0 will make a large difference in memory allocation.
In indexes, it just stores it, it doesn't have to start anywhere. I could set unit=var[2938] if I so wished, and then could access it later... I see why using 0 in some things would be a good starting point, but indexes don't have starting points and ending points, just minimum point (0)
...This is bothering me. Is it indexes or indecies? --donut3.5--