HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Code not working

01-09-2009, 09:52 PM#1
holyadvocate
Should be working, but it isnt... sucks...i hope its because im missing something

Trigger:
Mass Hysteria
Collapse Events
Time - Every 2.00 seconds of game time
Conditions
Collapse Actions
Collapse Unit Group - Pick every unit in (Units in (Playable map area) matching (((Picked unit) has buff Mass Hysteria ) Equal to True)) and do (Actions)
Collapse Loop - Actions
Unit - Order (Picked unit) to Attack (Random unit from (Units within 512.00 of (Position of (Picked unit))))
01-09-2009, 09:57 PM#2
Anitarf
Try copying your actual trigger (copy as text option) and paste it in [trigger] tags.
01-09-2009, 11:52 PM#3
holyadvocate
Displayed the trigger properly...

cool feature...
01-10-2009, 12:09 AM#4
TheSecretArts
How is it 'not working', are the units not attacking units? Because they might be picked unattackable units.

Edit: OH DUH, its this line right here
Trigger:
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Picked unit) has buff Mass Hysteria ) Equal to True)) and do (Actions)
It should be
Trigger:
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Unit Being Matched) has buff Mass Hysteria ) Equal to True)) and do (Actions)
(Or something like that)
Because the 'Picked Unit' isn't set until after the Unit Group line is evaluated. For any comparisons within that like you'll have to use 'Unit Being Matched' (or something to that degree) because that refers to the unit that is being compared in the condition, hence "matching ..."
01-10-2009, 01:38 AM#5
holyadvocate
Good to know, thank you for the help

EDIT: The ability appears to be working
01-10-2009, 09:26 AM#6
Anitarf
Quote:
Originally Posted by holyadvocate
EDIT: The ability appears to be working
Also, it seems to be leaking a ton of groups.
01-10-2009, 09:44 AM#7
holyadvocate
Quote:
Originally Posted by Anitarf
Also, it seems to be leaking a ton of groups.


Naturally, there are lots of easier ways to do this, actions which are triggered as the spell is cast and end when the spell does, etc; The OTHER effects involved do not, unfortunately, afford much leniency.

the whole spell is a mess, but it does that job, its easier and im not completely sure how else i would do it
01-10-2009, 03:39 PM#8
TheSecretArts
JASS > GUI except when laziness / speed is an issue.
01-10-2009, 05:24 PM#9
DioD
This code also have many nested for group calls, this is very hard hit for map stability.