I don't think you can specify external galaxy files for inclusion, currently :(
The hack I'm using is to use a placeholder action at the top of my library that uses a custom script action to include all my files. (custom script is something along the lines of:
It also really helps if you save the map as a "SC2Components" (expanded), rather than a standard MPQ-based archived map so that you can edit the files without having to import every other minute.
Doesn't garbage collection usually kicks in once a memory address is orphaned?
Anyway - it doesn't make sense that the memory usage just stops increasing at one point. If the collector would peroidically clean the memory it would rise and fall in turn, wouldn't it?
That's just one type of garbage collection (reference counting) - a lot of really common GC implementations perform periodic cleanup (most Java stacks, for instance - which is why you sometimes experience random pauses when using java apps.
Given your evidence, you're probably right that SC2's using some sort of reference counting method, but it could be the case that the game also has a pool of memory that stays allocated and gets reused as needed.
Why is it that WASD lags exactly?Is it the timers required?Or something else?And what else would that apply to?
The game client seems to try to keep events in sync across all players; Network latency is slowing it down at that point - it might even have to wait for other players' game client to acknowledge the key press
It means you tried to ask for an entry that was out of bounds for an array: For ex, asking for the 10th element of an array that only stores 5. Generally means your code isn't doing what you want it to, or you're not validating the value
@Nevir27: Go
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.
Sortakinda.
If you use the data table, you can simulate dynamic allocation (and it's pretty quick, though I haven't done extensive profiling yet), but you've got to build out a indexing scheme to use there so you avoid naming collisions. I tend to use "ListName/#" to store the count of items in a dynamic array, and "ListName/1", "ListName/2", etc to store values (starting at 1 makes life a lot easier when interacting with all the other Blizz stuff that starts at 1).
The main intent behind no text -> string conversion is that text values can change based on the locale of the user. You don't want to rely on them for lookups, only for displaying localized content to the user.
I'm still a bit fuzzy on your example, but why not pass the Race's id around (which is a static string value), and do a Catalog lookup for the name when you need it? And ditto, if you need to reference races in other data table entries, use the race id rather than its name ("Prot", "Terr", "Zerg", "Neut", etc). Any time you reference the race as a game link in the GUI, it just spits out a string with the race's id.
Doesn't StringExternal() look up game strings from all the mods your map depends on, in priority order? (since it's the foundation of how the text type works)
For situations like this, Blizzard seems to prefer doing a unit morph (but that means you need to set up two units, which may not be ideal in your map). I'm not sure what this takes to get going.
The other option is to set up your actor's events so that it first plays the morph animation, and then does the model swap when the animation finishes. (or the reverse, if the morph needs to be done after the swap)
For the selection circle not moving, make sure your actors have _Selectable as an alias
In the unit definition in the data editor, edit the "Unit - Flags" field and enable "Turnable". Then just hold control and drag around to rotate it in the terrain view
You might also need to set the "Movement - Turning Rate" to 0 if it's rotating in game.
0
@caspersc: Go
I don't think you can specify external galaxy files for inclusion, currently :(
The hack I'm using is to use a placeholder action at the top of my library that uses a custom script action to include all my files. (custom script is something along the lines of:
It also really helps if you save the map as a "SC2Components" (expanded), rather than a standard MPQ-based archived map so that you can edit the files without having to import every other minute.
http://nevir.net/sc2/Scripted_Map_Template.zip
0
That's just one type of garbage collection (reference counting) - a lot of really common GC implementations perform periodic cleanup (most Java stacks, for instance - which is why you sometimes experience random pauses when using java apps.
Given your evidence, you're probably right that SC2's using some sort of reference counting method, but it could be the case that the game also has a pool of memory that stays allocated and gets reused as needed.
0
Do we know what style of GC algorithm the engine uses? (mark & sweep? generational?)
0
The game client seems to try to keep events in sync across all players; Network latency is slowing it down at that point - it might even have to wait for other players' game client to acknowledge the key press
0
@Fullachain: Go
You can center it by setting the width to 0 and anchoring it relative to the top or bottom of the dialog
0
If the array is defined as "size 10" in the GUI, it actually gets a size of 11, though
0
@Vicboy: Go
It means you tried to ask for an entry that was out of bounds for an array: For ex, asking for the 10th element of an array that only stores 5. Generally means your code isn't doing what you want it to, or you're not validating the value
0
Sortakinda.
If you use the data table, you can simulate dynamic allocation (and it's pretty quick, though I haven't done extensive profiling yet), but you've got to build out a indexing scheme to use there so you avoid naming collisions. I tend to use "ListName/#" to store the count of items in a dynamic array, and "ListName/1", "ListName/2", etc to store values (starting at 1 makes life a lot easier when interacting with all the other Blizz stuff that starts at 1).
0
@Sixen: Go
If that doesn't work, you might also be able to replace the minimap icon with a transparent/blank image
0
@SiNiquity: Go
The main intent behind no text -> string conversion is that text values can change based on the locale of the user. You don't want to rely on them for lookups, only for displaying localized content to the user.
I'm still a bit fuzzy on your example, but why not pass the Race's id around (which is a static string value), and do a Catalog lookup for the name when you need it? And ditto, if you need to reference races in other data table entries, use the race id rather than its name ("Prot", "Terr", "Zerg", "Neut", etc). Any time you reference the race as a game link in the GUI, it just spits out a string with the race's id.
For ex, to get the localized name of the race:
0
@Xaestro: Go
Doesn't StringExternal() look up game strings from all the mods your map depends on, in priority order? (since it's the foundation of how the text type works)
0
@Colawaffle: Go
Here's the libNtve source as of a while ago, not quite fully up to date:
http://pastebin.com/h1kVj685
0
For situations like this, Blizzard seems to prefer doing a unit morph (but that means you need to set up two units, which may not be ideal in your map). I'm not sure what this takes to get going.
The other option is to set up your actor's events so that it first plays the morph animation, and then does the model swap when the animation finishes. (or the reverse, if the morph needs to be done after the swap)
For the selection circle not moving, make sure your actors have _Selectable as an alias
0
Quote from xytor: "Cool, thanks... also, is there any way to turn animations off? I made a viking doodad but it is animated and really annoying..."
Yeah, in the doodad's actor, open up "Event - Events +" and remove the "ActorCreation: AnimPlay Stand Stand PlayForever" entry
0
@xytor:
In the unit definition in the data editor, edit the "Unit - Flags" field and enable "Turnable". Then just hold control and drag around to rotate it in the terrain view
You might also need to set the "Movement - Turning Rate" to 0 if it's rotating in game.