Makes sense given that the GUI is just a thin layer over the actual Galaxy Script, but at this time of night that did not occur to me. In any case, you've been informed :)
Just above the reply, you should see a button that looks like a gear. Click that and hit "ok" when the dialog pops up. Paste your trigger code between the code tags.
Hey thanks for the help. I really should have been more specific. I get how to make a parameter allow multiple, and I understand how to pass parameters to that function (just like the arithmetic / string functions). My problem is writing the function itself - let's say you have the following:
How does one utilize "Allow Multiple" option for parameters? Figured something so basic had already been asked and answered, but I can't seem to find anything via search.
Edit: In particular, my problem is writing the function itself - let's say you have the following:
General - Custom Script lets you write custom script code (in the editor).
You can hit ctrl+F11 to view the compiled script (so you can see how your non-custom triggers are getting compiled).
There's probably a way to write custom script outside the editor and import it via the Trigger Editor, but I haven't messed with that yet.
Awesome. I've actually been meaning to get into the custom scripting (the GUI just takes so long to navigate the menus), and this is just the kick start I needed! Didn't realize there were native functions that couldn't be called via the GUI either. Wish I'd taken the plunge earlier.
Now that I can detect morphs (again, much <3), I'm running into an issue with what I wanted to do with the morphs. The idea is that these morphs take some time, but can be "disabled" if the power is cut. However, upon restoring power the morph should begin where it left off. I thought it would be as easy as "Unit - Pause" and "Unit - Resume" but pausing actually causes the morph to become canceled..
GOAL: A Trigger that will fire whenever a unit morphs
Alright, so I've been playing around with unit triggers and events, and one thing I cannot get down is a generic "Unit Morphs -> Do this" (there seems to be something similar for nearly anything else a Unit does). The Trigger "Unit Uses Ability" seems to demand an exact ability to be given, and I want something more generic. Is there a way to accomplish this, perhaps another event I can utilize and then conditions I can check, without listing all my abilities that can induce a morph?
Building a Refinery (i.e. in game) and placing a Refinery (i.e. in the editor) are likely 2 different processes. My guess is building requires a vespene geyser, but placing one in the editor "includes" a geyser already underneath the Refinery.
Mmm good point; in which case it's probably best that it is Text and not String, as I was expecting "Terran" "Zerg" and "Protoss" and would thus break completely in other locales.
I actually do pass the race ID around quite a bit. However, in some parts, I need the exact strings Terran/Zerg/Protoss and not their truncated Race Game Link counterparts. But since I need the exact strings T/Z/P, and only those strings, it makes sense that I should hard-code those.
Excellent. Thanks for the tips!
As a quick/completely unrelated aside, there's no dynamic memory allocation in Galaxy, correct? I'm trying to figure out how to store data arrays (though I may just leave them be and reference them via functions)... hmm. Something to ponder on tonight.
0
@vjeux: Go
0
Makes sense given that the GUI is just a thin layer over the actual Galaxy Script, but at this time of night that did not occur to me. In any case, you've been informed :)
0
@DarkFireDragoon: Go
Just above the reply, you should see a button that looks like a gear. Click that and hit "ok" when the dialog pops up. Paste your trigger code between the code tags.
0
@anteevy: Go
Map -> Player Properties. From there you can set all the player races (among other things).
0
If the unit has a "limited" flying time due to "fuel" or something of the like, you could mimic the Viking ability and mess around with the durations.
0
@Quickshot14: Go
Hey thanks for the help. I really should have been more specific. I get how to make a parameter allow multiple, and I understand how to pass parameters to that function (just like the arithmetic / string functions). My problem is writing the function itself - let's say you have the following:
What actions do you use to access each individual "A" or "D"?
0
Bump :)
0
How does one utilize "Allow Multiple" option for parameters? Figured something so basic had already been asked and answered, but I can't seem to find anything via search.
Edit: In particular, my problem is writing the function itself - let's say you have the following:
What actions do you use to access each individual "A" or "D"?
0
I'm 90% sure it's the duration of an ability. If you make a custom ability it should get one (haven't tested myself).
0
@victor2100: Go
What I know:
General - Custom Script lets you write custom script code (in the editor). You can hit ctrl+F11 to view the compiled script (so you can see how your non-custom triggers are getting compiled).
There's probably a way to write custom script outside the editor and import it via the Trigger Editor, but I haven't messed with that yet.
0
@SBeier: Go
Awesome. I've actually been meaning to get into the custom scripting (the GUI just takes so long to navigate the menus), and this is just the kick start I needed! Didn't realize there were native functions that couldn't be called via the GUI either. Wish I'd taken the plunge earlier.
Now that I can detect morphs (again, much <3), I'm running into an issue with what I wanted to do with the morphs. The idea is that these morphs take some time, but can be "disabled" if the power is cut. However, upon restoring power the morph should begin where it left off. I thought it would be as easy as "Unit - Pause" and "Unit - Resume" but pausing actually causes the morph to become canceled..
0
GOAL: A Trigger that will fire whenever a unit morphs
Alright, so I've been playing around with unit triggers and events, and one thing I cannot get down is a generic "Unit Morphs -> Do this" (there seems to be something similar for nearly anything else a Unit does). The Trigger "Unit Uses Ability" seems to demand an exact ability to be given, and I want something more generic. Is there a way to accomplish this, perhaps another event I can utilize and then conditions I can check, without listing all my abilities that can induce a morph?
0
Building a Refinery (i.e. in game) and placing a Refinery (i.e. in the editor) are likely 2 different processes. My guess is building requires a vespene geyser, but placing one in the editor "includes" a geyser already underneath the Refinery.
0
Pausing / Unpausing Unit Morphs (i.g. Hatchery -> Lair).
0
@Nevir27: Go
Mmm good point; in which case it's probably best that it is Text and not String, as I was expecting "Terran" "Zerg" and "Protoss" and would thus break completely in other locales.
I actually do pass the race ID around quite a bit. However, in some parts, I need the exact strings Terran/Zerg/Protoss and not their truncated Race Game Link counterparts. But since I need the exact strings T/Z/P, and only those strings, it makes sense that I should hard-code those.
Excellent. Thanks for the tips!
As a quick/completely unrelated aside, there's no dynamic memory allocation in Galaxy, correct? I'm trying to figure out how to store data arrays (though I may just leave them be and reference them via functions)... hmm. Something to ponder on tonight.