HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Create N units loc

05-25-2004, 11:02 PM#1
Xinlitik
Code:
CreateNUnitsAtLocFacingLocBJ takes integer count, integer unitId, player whichPlayer, location loc, location lookAt [b]returns group[/b]

Ummm... does that mean it leaks a group every time I use GUI to create units? :< If so, would set bj_wantDestroyGroup = true clean it up?
05-26-2004, 11:05 AM#2
AIAndy
No, that function does not create a group. It always uses bj_lastCreatedGroup. That means the return value of that function should not be destroyed and the content of that group will change after the next CreateNUnits... .
If you need to keep that group, use GetLastCreatedGroup which copies that group (and therefore creates a group of course).
05-26-2004, 10:08 PM#3
Xinlitik
Ahhh I see. Thanks.