In either case, there is some trickery to doing this.
You cannot get the actor type of a unit to look up the portrait or the icon - but you can get the unit type of a unit. Therefore, if you name all of your actors exactly the same as you name their respective units, you can lookup the portrait or icon of any actor by substituting the unit type for the actor type.
I'm not sure if you can do that in the GUI, but in GalaxyScript, actor type and unit type are just strings, and therefore interchangeable.
Anyways, once you have the names properly set up, you want to get the icon/portrait by using the function Catalog Field Value Get. You would feed it something like:
Catalog Field Value Get (Actors, UnitGetType(unit), icon, Any Player)
Edit: I've seen some maps have achieved this successfully (SotIS).
Ours have actually been created and run by trigger up to this point.
Somewhat ironically I am in the process right now of replacing them with layout versions. The K5 Kerrigan unit status frame is also a layout version. It's not as simple as editing a field, though. You'll have to create an SC2Layout of the status frame in the UI module. Then you add it into the actor field "Custom Unit Status Frame". You also have to go to "Status Bar Flags" and enable custom (as well as disable any others, if your frame is replacing them).
The HotS dependencies have some unit status frames built in. Just open up the UI module, go down to HotS_UnitStatus (or something like that) and take a look at them. I think they're named something like "HeroStatusFrameTemplate" and the like.
You can try adding those to your units as a test. The name you put into the custom unit status frame field would be "HotS_UnitStats/HeroStatusFrameTemplate" for the example I gave above.
Off the top of my head, you would load the bank and then check if it's verified before accessing any data. Then you would set the option signature before saving it again.
Maps such as yours often enjoy success by having content that must be unlocked by repeat plays. Take Squadron Tower Defense - you have to unlock some of the builders.
Beyond that I think just use your common sense... If you think you can succeed eventually, then keep at it, but don't get lazy - listen to your players and make changes. If not, move on.
I realized how easy it is to abstract code by combining TriggerGetFunction and any piece of triggering information to use as a database key for accessing information outside of a trigger.
The strength of this is such that, with proper coding, you could take something as complex as a dialog health bar, create it with a single function with a unit parameter, and it would automatically update itself.
As an example, initialize the health bar by passing this function a unit. The initialization function creates a trigger for updating the health bar, and also saves the dialog into the database, at a key created by combining the name of the update function with the ID of the unit. Then the update function can access the health bar by combining these two pieces of information, and update it automatically.
My suggestion: have a single trigger on initialization that creates a dialog that replicates the appearance of the loadscreen. Then have a delayed trigger (1 second elapsed) that does all the heavy lifting while this "fake" loadscreen is displayed. You can add some text to display what is being loaded as well.
Recently discovered an actor action named "Host Site Operations Set".
I assume this allows us to modify the actor fields under "Hosting: Host Site Operations", including Operations, Hold Position, and Hold Rotation. Thus far, however, my attempts to use it have proved mostly fruitless.
I fooled around with a unit actor with a model actor hosted on it. I was able to use the action described above to add a rotator actor to the unit actor's site operations, but have not managed to modify the model actor's site operations using this message.
Anyways, please fool around with this and let me know how it goes!
0
@Mugen245: Go
Did you want the portrait or the icon?
In either case, there is some trickery to doing this.
You cannot get the actor type of a unit to look up the portrait or the icon - but you can get the unit type of a unit. Therefore, if you name all of your actors exactly the same as you name their respective units, you can lookup the portrait or icon of any actor by substituting the unit type for the actor type.
I'm not sure if you can do that in the GUI, but in GalaxyScript, actor type and unit type are just strings, and therefore interchangeable.
Anyways, once you have the names properly set up, you want to get the icon/portrait by using the function Catalog Field Value Get. You would feed it something like:
Catalog Field Value Get (Actors, UnitGetType(unit), icon, Any Player)
0
Ours have actually been created and run by trigger up to this point.
Somewhat ironically I am in the process right now of replacing them with layout versions. The K5 Kerrigan unit status frame is also a layout version. It's not as simple as editing a field, though. You'll have to create an SC2Layout of the status frame in the UI module. Then you add it into the actor field "Custom Unit Status Frame". You also have to go to "Status Bar Flags" and enable custom (as well as disable any others, if your frame is replacing them).
The HotS dependencies have some unit status frames built in. Just open up the UI module, go down to HotS_UnitStatus (or something like that) and take a look at them. I think they're named something like "HeroStatusFrameTemplate" and the like.
You can try adding those to your units as a test. The name you put into the custom unit status frame field would be "HotS_UnitStats/HeroStatusFrameTemplate" for the example I gave above.
0
@Juxtapozition: Go
UI - Show/Hide UI Frame.
0
@Dzuke911: Go
Try adding the hidden flag to your dummy veterancy behavior.
0
@Dzuke911: Go
Not really. It's also anchored to something else, I don't remember what, and the only way to move it is to move the thing it's anchored to.
0
@TerranMaster23: Go
Off the top of my head, you would load the bank and then check if it's verified before accessing any data. Then you would set the option signature before saving it again.
0
@Dzuke911: Go
A unit will only have an experience bar if you give it a veterancy behavior, so I'm somewhat confused by this question.
0
@TerranMaster23: Go
You need to use the action Set Bank Option (or something like that). Choose signature.
0
@TerranMaster23: Go
Maps such as yours often enjoy success by having content that must be unlocked by repeat plays. Take Squadron Tower Defense - you have to unlock some of the builders.
Beyond that I think just use your common sense... If you think you can succeed eventually, then keep at it, but don't get lazy - listen to your players and make changes. If not, move on.
0
As far as Galaxy revelations go,
I realized how easy it is to abstract code by combining TriggerGetFunction and any piece of triggering information to use as a database key for accessing information outside of a trigger.
The strength of this is such that, with proper coding, you could take something as complex as a dialog health bar, create it with a single function with a unit parameter, and it would automatically update itself.
As an example, initialize the health bar by passing this function a unit. The initialization function creates a trigger for updating the health bar, and also saves the dialog into the database, at a key created by combining the name of the update function with the ID of the unit. Then the update function can access the health bar by combining these two pieces of information, and update it automatically.
0
Try to cut down on initialization triggers.
My suggestion: have a single trigger on initialization that creates a dialog that replicates the appearance of the loadscreen. Then have a delayed trigger (1 second elapsed) that does all the heavy lifting while this "fake" loadscreen is displayed. You can add some text to display what is being loaded as well.
0
Recently discovered an actor action named "Host Site Operations Set".
I assume this allows us to modify the actor fields under "Hosting: Host Site Operations", including Operations, Hold Position, and Hold Rotation. Thus far, however, my attempts to use it have proved mostly fruitless.
I fooled around with a unit actor with a model actor hosted on it. I was able to use the action described above to add a rotator actor to the unit actor's site operations, but have not managed to modify the model actor's site operations using this message.
Anyways, please fool around with this and let me know how it goes!
0
Wish that real life was like this.
0
@TMMagic: Go
There are numerous ways to create the progress bar.
If you want it to display experience, that bar already exists in the unit info panel, so I don't know why you would want another.
If you want it to display something else, then you can create it via trigger or layout file.
The main thing to know is that it will have to be updated via trigger, unless it's just another experience bar.
0
@TheSC2Maniac: Go
Well, there aren't that many active mappers, and I personally am wary of somebody who admits having a lack of skill in so many areas.