Quote from s3rius:
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?
----
No, garbage is collected whenever the collector runs. Though technically reference counting is a form of garbage collection, generally when people talk about GC they mean more than that (which is why C++ is not generally considered a garbage-collected language even when strict RIAA is used.) And most likely memory allocated to the galaxy VM is not released until the VM is restarted, which is why the apparent memory use will only go up over the course of a map running. This is NOT a memory leak.
@Nevir27:
AFAIK they haven't released those kind of technical details on the language implementation.
PS: Regarding the post above - there's nothing wrong with a 0.05-seconds loop. Galaxy is a rather fast scripting language and is able to deal with it very easily. So if you need it, then keep it. Don't just increase wait time because you fear for something that might not even be the case.
That wasn't my point, I meant that he might be having the trigger to do something that could easily be accomplished another way :)
Premature optimization is the root of all evil. Are you actually experiencing lag, or are you just worried that it might happen?
The only thing I'd suggest is not having a trigger run every 0.05 seconds. If its sole purpose is to have the camera track a unit then there's a Make Camera Follow Unit function which does the same thing.
I don't know. I've explored the tactical AI enough to have a rough idea of how the pieces fit together, but not enough to actually implement anything. If you want to get in there it'll be uncharted territory, since I have yet to see anyone post any guides on how it works.
In my TD I do powerups by giving them a weapon which has the scan filters set up to search for any heroes within a range of 1, and the weapon effect destroys the powerup and applies a behavior to the hero. No need for mucking around with items.
Won't this make it for ALL units like that? I'm designing a melee match vs ai. What if it's terran vs terran? Won't the unit data be the same?
I'm not sure what you mean. The Tactical AI is used for units to make their own tactical decisions about when to use abilities and who to target with them, while the trigger AI is used for strategic decisions like sending attack waves.
If you're worried about it mucking with the human controlled units, tactical AI is only enabled when the unit is computer controlled.
Well, there is. Open up the ColossusAttackImpactSite and ColossusAttackImpactSiteReverse actors and under Host site Operations after SOpShadow add "SOpHigherBy5". That'll raise the beams off the ground - you'll probably want to dupe the SOpHigherBy5 actor and change the Z-offset to about 3.75 which is the standard height for air units.
Looks goofy though, but if you just want to raise the beams off the ground that'll do it.
As for doing it in the data editor, it's possible to an extent - there are four damage types (ranged, splash, spell, and melee) and an attribute can affect each of them separately, so if you have four or fewer abilities just assign a different damage type to each of them.
0
Quote from s3rius:
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?
----
No, garbage is collected whenever the collector runs. Though technically reference counting is a form of garbage collection, generally when people talk about GC they mean more than that (which is why C++ is not generally considered a garbage-collected language even when strict RIAA is used.) And most likely memory allocated to the galaxy VM is not released until the VM is restarted, which is why the apparent memory use will only go up over the course of a map running. This is NOT a memory leak.
@Nevir27:
AFAIK they haven't released those kind of technical details on the language implementation.
0
Galaxy is garbage collected, so memory is going to increase until the next time the gc runs.
0
Dupe the SOpHigherBy5 actor and change the Offset field. Then add whatever you named it to the end of the actor's Host Site Operations field.
0
@KrumBum:
SOpHigherBy5, dupe and change the offset to whatever is needed.
This needs to be stickied at the top of the forum or something because it's asked every day :)
0
By request, here's a tutorial on how to create a missile weapon from scratch (i.e. no duplication of existing objects.)
http://rileystarcraft.blogspot.com/2010/06/tutorial-create-missile-weapon.html
0
That wasn't my point, I meant that he might be having the trigger to do something that could easily be accomplished another way :)
0
Premature optimization is the root of all evil. Are you actually experiencing lag, or are you just worried that it might happen?
The only thing I'd suggest is not having a trigger run every 0.05 seconds. If its sole purpose is to have the camera track a unit then there's a Make Camera Follow Unit function which does the same thing.
0
I don't know. I've explored the tactical AI enough to have a rough idea of how the pieces fit together, but not enough to actually implement anything. If you want to get in there it'll be uncharted territory, since I have yet to see anyone post any guides on how it works.
0
In my TD I do powerups by giving them a weapon which has the scan filters set up to search for any heroes within a range of 1, and the weapon effect destroys the powerup and applies a behavior to the hero. No need for mucking around with items.
0
I'm not sure what you mean. The Tactical AI is used for units to make their own tactical decisions about when to use abilities and who to target with them, while the trigger AI is used for strategic decisions like sending attack waves.
If you're worried about it mucking with the human controlled units, tactical AI is only enabled when the unit is computer controlled.
0
Under Unit Flags uncheck Cannot Be Clicked.
Or you can create a generic Mouse Clicked trigger, get the current mouse position and search for whatever unit is there.
0
Well, there is. Open up the ColossusAttackImpactSite and ColossusAttackImpactSiteReverse actors and under Host site Operations after SOpShadow add "SOpHigherBy5". That'll raise the beams off the ground - you'll probably want to dupe the SOpHigherBy5 actor and change the Z-offset to about 3.75 which is the standard height for air units.
Looks goofy though, but if you just want to raise the beams off the ground that'll do it.
0
Open up the Data Editor and look through Tactical AI, Target Find, and Validators - especially those starting with "Tactical".
0
http://rileystarcraft.blogspot.com/2010/06/tutorial-create-custom-trigger-hooks.html
As for doing it in the data editor, it's possible to an extent - there are four damage types (ranged, splash, spell, and melee) and an attribute can affect each of them separately, so if you have four or fewer abilities just assign a different damage type to each of them.
0
Set Minimap Visibility is an actor message.