HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Advanced Trigger: New Semi-Event Added - A unit approaches a unit group

12-03-2003, 09:04 PM#1
Kolibri
Hope this helps somebody.

http://www.daimi.au.dk/~rawl/WC3/map...oUnitGroup.w3x

The event (unit comes within range of specific unit) can be changed if you wish, but there should be no need, and it requires a bit of JASS editing.

EDIT: Oops, it wasn't a bug in the code, it was a bug in the test. The test should work in the ewly uploaded map.
12-04-2003, 08:07 PM#2
Garu
I apologize, but for some reason I just can't figure out how to use this, and it would be extremely useful for my current project. JASS sort of gives me the willies. Could you perhaps post a slightly more detailed explanation of how to use it? Also, what sort of lag will this trigger cause? Thanks.
12-04-2003, 09:17 PM#3
Kolibri
Follow the Test thingy and you'll be set.

Anyway.

Edit the Too Close To unit group with whatever actions you want to happen when a unit gets to close, the unit getting too close is in the "triggeringunit" variable.

To add <UNIT> to the unitgroup:

Set UnitToAddToUnitGroup = <UNIT>
Run AddUnitToUnitGroup


To remove <UNIT> from the unitgroup:

Set UnitToRemoveFromUnitGroup = <UNIT>
Run RemoveUnitToUnitGroup


NOTE: The units aren't actually added to any actual unitgroup, it is just a figure of speech. If you want the units in a unit group you will have to do so yourself (as in the test).

You don't have to know even a tiny bit JASS to use the triggers. :)
12-07-2003, 02:20 AM#4
Kolibri
Did that help?

If not I can explain it further or maybe add another example. :)