| 02-13-2006, 06:50 AM | #2 | |
You won't get smooth movement by 0.10 wait probably :) hmm Quote:
And you should nullify unit variables too. And are you sure you gave Premanent Immolation to shuriken unit? |
| 02-13-2006, 08:02 AM | #4 |
Loops should support local variables, since they don't create a seperate function for the loop actions, like the if-then-else does for conditions. However, you have other problems, you wait inside an Integer A loop, which is bad because Integer a is global and can be altered by other triggers during the wait. Also, warcraft is incapable of waiting for such a short time, the wait action is inaccurate, for such small wait, you must use timers or triggers with periodic events. That's how I would do this spell, I would just put all the shuriken into a unit group and then, in a periodic trigger, move all the shuriken around the hero. |
| 02-13-2006, 08:06 AM | #5 |
thanks alot Anitarf, i might do that. Was thinking something like that aswell. But one problem. How can i move the units around the caster, in another trigger, without assigning the caster to a variable. Because if i do that, it wouldnt be multi instanceable? |
| 02-13-2006, 08:15 AM | #6 |
Have a unit array and a unit group array. Into the unit array go the heroes, and into the unit groups go the shuriken groups. When creating the shuriken, you just need to figure out into which group it goes (the one that has the array index under which the hero is stored in the unit array). For determining array indexes, it depends on what degree of multi-instanceability you want to have; if it's one hero per player, you can easily use player numbers as the array indexes when storing the hero or the shuriken he creates. For full multi-instanceablility, you have to loop through the array until you find an empty index to store the hero, and afterwards loop through it every time a shuriken is cast until you find the index under which the casting hero is stored. |
| 02-13-2006, 08:26 AM | #7 |
i only think im gonna need one hero per player, so i guess that would work. Thanks again. |
| 02-13-2006, 11:57 AM | #8 |
the local variable trick only works for one local vaiable at a time for some odd reasons. locals work well in loops. Not in Unit Group - Pick every unit in group / also pick every item/destructable/player thise use another function |
| 02-13-2006, 12:16 PM | #9 |
I forgot that blizzard tells in triggers that Waits shouldn't be used within loops. |
| 02-13-2006, 12:39 PM | #10 | |
Quote:
The gamr already handles shit like that, if you offset it by 390 for example, it will go 390 degrees from the static point of 0 degrees, so on that front he needs not worry. |
| 02-13-2006, 12:43 PM | #11 | |
Quote:
|
| 02-13-2006, 06:07 PM | #12 |
Oh, well, thanks alot for the replies everyone. I made it work now. |
