| 05-09-2006, 03:59 PM | #2 |
First, I very much recommend you go to the tutorial section and read a tutorial on memory leaks. If you are going to do something like this, you need to know about them, and how to avoid them. Second, don't put in 'do nothing'. It is a pointless thing with no purpose. Thidly, http://www.wc3campaigns.net/showthread.php?t=73104 is what you are looking for, I believe. |
| 05-09-2006, 04:26 PM | #3 |
-Thank you for the heads up on memory leaks. I read about them some time back because someone pointed them out in one of my older maps, but I never really understood them 100%. I'll take the time to read up more after I post this. -I'll remove the "Do Nothings" just because "it is a pointless thing with no purpose". :) -And no this is close, it might help out a bit, but looking at it.. it will still probably not do what i want it to do. Here is a crude example: This would be the arena below. Each unit spawned is random. So the first time you play, the units might be in this spot, next time, another spot. ___________ |--------x---| |--x---------| |------x-----| |---x--------| |x--------x--| If i just create a mass of units using Units - Create XX units for player at XX facing blah blah, then it creates them all at one point instead if I create them individually like so. ____________ |------------| |------------| |--xxx-------| |--xxx-------| |------------| I doubt it's possible, but the main goal I guess I am trying to reach would be to use the standard create units action but make them all appear in a random spot in a single rect, as opposed to using multiple rects. It's probably just not possible. |
| 05-09-2006, 04:56 PM | #4 |
Set SpawnType = Level 1-HMelee For each Integer A from 1 to 12: --Loop ----If Player(Integer A) is Equal to Playing ------Then --------For each Integer B from 1 to 3: ----------Loop ------------Set TempPoint = (Random point in Bowl <gen>) ------------Unit - Create 1 Soldier SpawnType for Player(Integer A) at TempPoint facing Default building facing (270.0) degrees ------------Custom Script: RemoveLocation(udg_TempPoint) ------------Set TempPoint = (Random point in Bowl <gen>) ------------Unit - Order (Last created unit) to Patrol To TempPoint ------------Custom Script: RemoveLocation(udg_TempPoint) ------------Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl ------------Special Effect - Destroy last created special effect ------------Unit - Add 14 second generic expiration timer to (last created unit) // more efficient You can forget about the other trigger if you use expiration timers, and you can just use the same trigger but set the spawn type to something else. |
| 05-09-2006, 05:15 PM | #5 |
I put a few hours of thought into this trying to figure it out and you whip it up in a few minutes! I'm very greatful, works like a charm! Thanks a bunch, super greatful! |
