Simple Questions/Answers - Page 147
Forum Index > SC2 Maps & Custom Games |
Meavis
Netherlands1300 Posts
| ||
SwedenTheKid
567 Posts
| ||
MorroLord
Italy4 Posts
Thanks | ||
javascripter
14 Posts
Also, is there a way to use triggers to raise supply depots? And does it matter whether or not it is currently lowered? | ||
OtherWorld
France17333 Posts
| ||
javascripter
14 Posts
| ||
javascripter
14 Posts
And does setting a variable equal to "+" increment it? EDIT: It doesn't, how do you increment/decrement a variable? | ||
turtles
Australia360 Posts
is there a way to use triggers to raise supply depots? Go into the data editor and look at supply depots in the units tab (or lowered supply depots if they are a seperate unit). It will have a section called abilities on of which will be for lowering/raising. In the triggers section you want "issue unit order" trigger. Select the order and chose "order with no target" and select the ability. Some abilities do different things based on which parameter you give them for example 0 might be raise and 1 might be lower. So you might have to use another trigger to select which one. I think it's something like "ability command for ability" in the trigger editor. I don't have it in front of me so I can't give you specifics. Hopefully I gave enough info to give you a lead though. Also, using a trigger with two events that will trigger it, how do I set it up so that I can later do something differently depending on which one happened? (increment a variable if one happens and decrements a variable if another happens?) If you are not familliar with programming then I recomend that you find a beginners tutorial about functions, triggers, different variable types etc. It will teach you what you need to know. If you are familliar with programming then you need two seperate triggers calling a function (the editor calls functions with no return type "action defenitions") with different parameters based on which trigger fired. how do you increment/decrement a variable? Doing basic maths: Say you have a variable x which is an integer. use the function "set variable" and set the variable to x. As for the right hand side of the equation click it and go to functions and look into the math section or just type in the search field. Search for one called something like "arithmatic (integer)" or somethjing like that. set the two fields as x and 1. It will end up looking like "x = x + 1" Short cut for modifying a variable There is a function called "modify variable (int)" which is a shortcut for the above if you only want to increment/decrement/other a variable. | ||
javascripter
14 Posts
I do know programming. How do I call the action definition (I find calling them definitions strange though) from the trigger? (Also, I haven't heard of "trigger" in programming. Is it kinda like an event or interrupt? (I think those are fairly similar?)) | ||
turtles
Australia360 Posts
I do know programming. I should have just looked at your name ![]() I haven't heard of "trigger" in programming. Is it kinda like an event or interrupt? (I think those are fairly similar?)) To me a trigger is a function which gets called when it's event happens. An event is something like "unit dies", so every time a unit dies SC2 will call that function. But I've heard others refer to EVERYTHING in the trigger editor as a trigger so I'm not sure what the proper term to use is. But yes, to my understanding it's exactly like an event or interupt. How do I call the action definition I'm assuming you're using the GUI. (there are ways you can write the script by hand in a text editor and import it, maybe that would feel more natural to you but I think the GUI is quite good) Bottom left is a list of all the functions/triggers/action definitions. You can right click and it will come down with a menu. One of them is "create action definition". It's silly when an "action definition" is just a regular function which returns NULL but for some reason Blizzard decided they had to give it a different name to confuse people. click on the newly created action definition and you will see sections for parameters, variables, and actions. Right click the parameters and click "new parameter" and chose what variable type the parameters will be. Once your action definition is set up go to the trigger and create new action. The action definition should be there in the list of possible actions. You can set the parameters to call it with. | ||
javascripter
14 Posts
If I could convert the stuff from the GUI to code and back on the Fly, I might do that, but I'M lazy and don't like to learn whole New languages. (especially the stuff I'M asking about Here) I didn't even think of looking for the name of the function. How do I set up something to log the current value of int variables? That would be helpful for debugging. | ||
Ej_
47656 Posts
| ||
TheFish7
United States2824 Posts
| ||
turtles
Australia360 Posts
How do I set up something to log the current value of int variables? That would be helpful for debugging. There is a debugger you can use though I don't like it much. Look under file->preferences or something and you have to start the game in windowed mode. I've created my own debbugging tools library which I use sometimes but no matter what approach I take there are downsides to it. I'm yet to find a good way to log actions for later debugging. | ||
sleightofderppro
United States1 Post
| ||
OtherWorld
France17333 Posts
| ||
ward4321123
United States1 Post
User was banned for this post. | ||
JaredStarr
Canada115 Posts
![]() Would this work as a 4th and up base in melee? | ||
SwedenTheKid
567 Posts
| ||
JaredStarr
Canada115 Posts
Mineral line would face the map center, hallways on either side and. Main would be somewhere behind it. | ||
| ||