I'm at work so I can't point you exactly to the right field, but on the unit's actor there should be a "status bar flags" field that lets you turn on the various bars (health, shields, progress, etc) - just uncheck everything you don't want
Hmm, I can't get it to work by tweaking just those values :-/ Mind taking a look at a test map?
The visual indicator for the selection resizes properly, but the area that you can click on still seems constrained to the model proper. The start point really highlights this, as only the "pin" portion of it seems selectable. (where's /that/ defined? as part of the model?)
Note: This is a repost of my thread over on the battle.net forums to get some extra exposure.
I'm trying to attach additional models to a unit, and have them act as part of the unit (mostly, I want to be able to select the unit by clicking on an additional model). Secondly, I'm looking for a way to do this entirely in the data editor so the extra models show up in the terrain editor, and not just in game.
Here's how I'm currently attaching the additional model:
The model is defined as an actor of type Model (with a parent of CActorModel):
The Subject field of "Hosting - Host +" is set to "Selectable". "_Unit" also works. _I'm not sure what this is defining.
The Operations field of "Hosting - Host Site Operations +" is set to SOpAttachOrigin.
The unit's actor is defined in a regular manner, except I add the following event:
ActorCreation
Create NameOfExtraModel
Alternatively, you can also skip the event on the unit and have a UnitBirth.UnitName: Create event on the extra model.
This is all fine and dandy, and I've got the extra model scaled/tweaked to look nice when attached to the unit, but the problem is that I can't select the unit when clicking on the extra model. One last thing I also am trying to achieve: I've got this extra model attached in the same way to several units, and I'd like to be able to just reference it in the main unit actor rather than duplicating it for each unit.
I agree with Whiskee - breaking it into a small functional component like that makes a lot of sense for most cases. Is there something in your use where breaking the actions apart doesn't work as cleanly?
If that doesn't cut it, you could use the local data table (only valid for current thread) to pass it around - similar to how Pick <Player/Unit> and Get Picked <Player/Unit> work, but in the reverse. Maybe pass a prefix to the receiving end to keep it clean.
From what I understand, you want the zerglings to respawn where they die (or at some random point near their point of death?)
Take a look at the attached map - you can do that without regions, mostly by grabbing all the values you want out of the unit/player before your wait action
Give "Enable/Disable Leaderboard State" a whirl. It's got a "Showing" state that you can turn on/off - I'm guessing that it'll do what you want (haven't tried)
You need to create a trigger that iterates through each active player and pan the camera to their start point (instantly). The game only does it by default as part of the standard melee triggers, once you override those, you need to do it yourself :)
It's not a very good solution, but to get a event based off a item being used I gave all possible units that could use the item a hidden dummy ability. Then made the item's effect itself issue a order to use said ability, which let me use the "Unit uses a ability" event. Its crappy, but it works for now.
Did you have to give the unit your dummy ability as well, or do items grant the unit that ability?
Yeh, SC2 uses a garbage collector. So while you shouldn't see "memory leaks", you still need to be aware that keeping references around to values will cause them to stay in memory. Rule of thumb, never use global variables or store stuff in the data table unless you really, really need to.
I've been playing a bit with overriding UI layouts and whatnot as part of a given map (not directly modifying the core mods) - no luck so far. Has anyone found methods for doing so, or is this something that's likely off limits?
One thing you may want to change is the "Grammar Text" entry. Just leave the "User Default Grammar Text" enabled and it will allow you to use the nice hyper-link method of inserting parameters in your triggers.
If you do override the grammar text like I did, you can highlight words/passages and choose a variable that they link to (dropdown at the bottom of the window) - makes it a bit easier to read for some functions/actions :)
Note that the return action is returning a custom script value to force the "cast". (parameters are prefixed with lp_ - if you change the name of the parameter, make sure you change the return value accordingly.)
0
@Amaroqwlf:
Doesn't seem to do it - the extra model still doesn't grab clicks on the unit :-/
I think you've got me going in the right direction, though. Terran building construction seems to do this, but I can't quite piece together the how.
0
Edit: mispost, but good excuse for a bump.
0
@BrotherLaz: Go
I'm at work so I can't point you exactly to the right field, but on the unit's actor there should be a "status bar flags" field that lets you turn on the various bars (health, shields, progress, etc) - just uncheck everything you don't want
0
Hmm, I can't get it to work by tweaking just those values :-/ Mind taking a look at a test map?
The visual indicator for the selection resizes properly, but the area that you can click on still seems constrained to the model proper. The start point really highlights this, as only the "pin" portion of it seems selectable. (where's /that/ defined? as part of the model?)
0
Note: This is a repost of my thread over on the battle.net forums to get some extra exposure.
I'm trying to attach additional models to a unit, and have them act as part of the unit (mostly, I want to be able to select the unit by clicking on an additional model). Secondly, I'm looking for a way to do this entirely in the data editor so the extra models show up in the terrain editor, and not just in game.
Here's how I'm currently attaching the additional model:
The model is defined as an actor of type Model (with a parent of CActorModel):
The unit's actor is defined in a regular manner, except I add the following event:
Alternatively, you can also skip the event on the unit and have a UnitBirth.UnitName: Create event on the extra model.
This is all fine and dandy, and I've got the extra model scaled/tweaked to look nice when attached to the unit, but the problem is that I can't select the unit when clicking on the extra model. One last thing I also am trying to achieve: I've got this extra model attached in the same way to several units, and I'd like to be able to just reference it in the main unit actor rather than duplicating it for each unit.
Anyone have some pointers?
0
@JamesObscura: Go
I agree with Whiskee - breaking it into a small functional component like that makes a lot of sense for most cases. Is there something in your use where breaking the actions apart doesn't work as cleanly?
If that doesn't cut it, you could use the local data table (only valid for current thread) to pass it around - similar to how Pick <Player/Unit> and Get Picked <Player/Unit> work, but in the reverse. Maybe pass a prefix to the receiving end to keep it clean.
For Ex:
and then just grab the count and iterate over the result on the receiving end
0
From what I understand, you want the zerglings to respawn where they die (or at some random point near their point of death?)
Take a look at the attached map - you can do that without regions, mostly by grabbing all the values you want out of the unit/player before your wait action
0
Give "Enable/Disable Leaderboard State" a whirl. It's got a "Showing" state that you can turn on/off - I'm guessing that it'll do what you want (haven't tried)
0
@Squeegeez: Go
I think the secret will be overriding the SC2Layout files defined in Core.SC2Mod, if the game even allows us to.
0
@Etravex: Go
You need to create a trigger that iterates through each active player and pan the camera to their start point (instantly). The game only does it by default as part of the standard melee triggers, once you override those, you need to do it yourself :)
0
Did you have to give the unit your dummy ability as well, or do items grant the unit that ability?
0
Yeh, SC2 uses a garbage collector. So while you shouldn't see "memory leaks", you still need to be aware that keeping references around to values will cause them to stay in memory. Rule of thumb, never use global variables or store stuff in the data table unless you really, really need to.
0
I've been playing a bit with overriding UI layouts and whatnot as part of a given map (not directly modifying the core mods) - no luck so far. Has anyone found methods for doing so, or is this something that's likely off limits?
0
If you do override the grammar text like I did, you can highlight words/passages and choose a variable that they link to (dropdown at the bottom of the window) - makes it a bit easier to read for some functions/actions :)
0
The Time Of Day type is just a string internally (with the xx:xx:xx format). You can use the following function to convert it:
Note that the return action is returning a custom script value to force the "cast". (parameters are prefixed with lp_ - if you change the name of the parameter, make sure you change the return value accordingly.)