Well, as you know when SCM Draft generates the triggers, it automatically places the //-----// in between each trigger, and I think for readability it might be better if MacroTriggers also did this, even though it is not necessary, it helps identify different triggers
Hmmm... Well, I consider this. I just haven't thought about it because I usually don't investigate generated triggers. I personally see no difference with delimiters and without, for me it is all the same. There might be different opinions.
At this point, all you're missing is autocompletion, and with that I'd say it's just about perfect, I think if you could have a unit name autocomplete with a list of units(like SCM Draft) that would be handy, but for locations and such I don't feel it's really necessary, so as long as you have hints for actions and conditions, and maybe an autocomplete option for Notepad++ to lay out a blank version of that action when you start typing it, it'd be perfect
With an auto-completion I am restricted to fairly limited resources of what Notepad++ will allow me. The problem with unit names auto-complete is that raw unit names are Strings including quotation characters and space. Notepad++ can only auto-complete words composed of letters A-Z, a-z and an underline character (by the way, this is the cause why Notepad++ auto-completion could not be done for SCMD triggers). The problem is also in that all auto-completion words are put in one set. That way, if I add keywords and/or unit names to auto-completion these words might hinder auto-completion of actions and conditions, which is not good.
As for auto-complete option which lays out a blank version of an action or condition I also can't do that through Notepad++ auto-completion feature. I can suggest using macroses which Tux had used and described. He put several most frequently used actions and conditions to a Notepad++ macro and recalled them via numbers-hotkeys. Probably it is also a good idea to put a blank trigger there.
It also would be nice if Notepad++ could recognize variables and grant an ability to auto-complete those. An approximation of this useful feature might be the Notepad++'s auto-completion of frequently used words in the text (Preferences->Backup/Auto-completion 'Word completion' switch instead of 'Function completion').
Question 1: Do units need to be initialized as a variable in order to be used in the MacroTriggers, or can you just use unit names in the actions?
You can just use unit names, with a proviso that they are arguments to a
unit constructor @U("Unit Name"). Let's take a
Deaths(Player, QMod, Integer, Unit) condition for example. Actions and conditions arguments are typed in MacroTriggers. That means MacroTriggers expects a Player as a first argument, QuantityModifier as the second and so on. String
"Unit Name" itself has a String type and cannot be directly used at that places. The string should be transformed to an object of a desired type with use of type constructors like
@U(String) or
@P(Integer). That is made to prevent silly mistakes, for example when one can have a
"Terran Marine" location and accidentally mix up arguments and unintentionally specify
"Terran Marine" as a location. This allows the compiler to provide more useful information on error.
But I strongly recommend to use a variable for each unit used in triggers. Moreover I recommend using different variables for separate roles the particular unit plays in the triggers. To my mind naming of objects turned out to be the most useful feature of MacroTriggers, probably even more useful than triggers replication. When you have a list of definitions of objects at start of your text file that helps keeping track and organizing them. When you need to change the unit in a particular role to another one, you can simply change it in one place --- it's definition.
Question 2: Is there currently any way to place triggers in MacroTriggers into different tiers to allow for minimizing of sections of triggers when you're done with them?
Do you mean the sections collapse thing? Ermmm, don't quite understand again.
Question 3: Would it be possible to place unit's name in a sort of array so that you could use mathematical operations to pick different unit names in a loop?
Bull's eye hit! No.To my mind this is the only significant feature MacroTriggers strongly needs and it is mainly the only thing I mean when say "Some features I wanted to make were not implemented. Probably I will finish that later."
Post has been edited 3 time(s), last time on Apr 29 2009, 8:46 am by Wormer.
Some.