I have a unit in my game, with an actor that is linked to a standard model. The "size" attribute of the actor is modified such that it appears to be half of the model's original size.
However, when I observe the unit in game, and it is visible (ie within sight range of one of my units), all is good. But when my units move out of sight range and the unit is hidden under fog of war (for of war visibility set to "snapshot" on both actor and unit), the model reverts to its original size.
I am not understanding the process behind this. How do I prevent it from happening? I have gone through all "fog of war" settings I could find on the unit/actor/model, but nothing seems to fix the problem. Help is much appreciated.
I've since discovered that this only applies to units with hosted attachment models. In this case, when in fog of war, the attachment disappears, and the host model is the one that changes back to its original model scale unwantedly. If I take the attachment off, voila, the host works like it should.
So what about the attachment causes the host to change like that? This is the part that confuses me. Does anyone know?
I am not sure of the solution to your issue. However, I have had a similar problem. I attached a special effect to units in my game, however, when units under on the edge of fog of war, the player model properly disappears like a unit heading into fog. But... The special effect stays visible. The special effect will become completely invisible only if the unit moves deep into fog.
I have been trying to figure this out. I suspect if we figure this out, it will resolve both our issues.
I've got the same problem. Look at pictures below. Attached models looks fine when a unit is visble. But under fog of war they return to original size. How to fix it?
You could change the scale in the model instead of the actor. You can also change the unit's UI - Fog Visibility property so that it doesn't appear at all when the unit is not currently in sight. Either of these should fix it.
Every time models are seen under the fog (i'd like them to be seen), they are huge, no matter where scale is set in, at model or at actor. Seems like scale values just doesn't affect models under fog of war...
I realize this is a necro, however I recently had the same problem and eventually came to the following conclusions. (Note: this has only been tested on a structure with an attachment). I thought I would paste my findings here to help others who might run into the same problem.
If the unit is scaling larger under the fog of war, but returns to normal size when in view, look into setting the Host+ on the attachment to _Selectable or _Unit. (and not to the unit its attaching to, i.e." the base")
This occurs when a model attachment's scale has been increased and the actor for the model is trying to inherit model/actor scale from the "base". I'm not sure which setting to disable to prevent this, as they all gave varying result. In the end, its easier to leave the host attach as _Selectable and rely on the event create data to apply your attachment to your unit.
Unit "jumps" when being revealed/hidden by the fog of war.
- If the unit is "jumping' under the fog of war, try recreating your base actor. There are apparently some problems with creating a unit/structure from scratch, namely that there are some events that prevent this jumping behavior in the fog of war (I'm not sure which ones, but probably hallucination detection).
("jumping" meaning, the actor/model height changes ingame/building starts floating, but the footprint (placement point) does not)
-Attaching a SOpAdjust local offset of a minor amount to the base unit also fixes this problem, however the unit will (probably?) disappear in the editor
Depending on the solution you want, you can also set the fog of war visibility on the unit, or the actor. Just make sure iProperties: Inherit Properties+ is set to enable/disable visibility how you see fit. If enabled, ithe fog of war visibility will filter down the unit to each attachment that has it enabled. If you want it to pass down the type, the attachment has to have the item enabled in "Accepted property transfers"
re re necro but setting a local offset on the base didnt fix my problem (model addtions were detached from host refered as "jumping"). i have attached spine crawlers to a tree unit with uberlisk method. my problem could be fixed by simply checking the FailOnNoHost under Host+ of the attachment actor. tested it several times and it seems to work now.
Hey,
I have a unit in my game, with an actor that is linked to a standard model. The "size" attribute of the actor is modified such that it appears to be half of the model's original size.
However, when I observe the unit in game, and it is visible (ie within sight range of one of my units), all is good. But when my units move out of sight range and the unit is hidden under fog of war (for of war visibility set to "snapshot" on both actor and unit), the model reverts to its original size.
I am not understanding the process behind this. How do I prevent it from happening? I have gone through all "fog of war" settings I could find on the unit/actor/model, but nothing seems to fix the problem. Help is much appreciated.
KrayzBlu
@KrayzBlu: Go
I've since discovered that this only applies to units with hosted attachment models. In this case, when in fog of war, the attachment disappears, and the host model is the one that changes back to its original model scale unwantedly. If I take the attachment off, voila, the host works like it should.
So what about the attachment causes the host to change like that? This is the part that confuses me. Does anyone know?
Thanks
@KrayzBlu: Go
I am not sure of the solution to your issue. However, I have had a similar problem. I attached a special effect to units in my game, however, when units under on the edge of fog of war, the player model properly disappears like a unit heading into fog. But... The special effect stays visible. The special effect will become completely invisible only if the unit moves deep into fog.
I have been trying to figure this out. I suspect if we figure this out, it will resolve both our issues.
@ShadowDestroyer: Go
How does one specify between deep fog and near fog? I can only find one parameter: fog of war visibility.
I've got the same problem. Look at pictures below. Attached models looks fine when a unit is visble. But under fog of war they return to original size. How to fix it?
You could change the scale in the model instead of the actor. You can also change the unit's UI - Fog Visibility property so that it doesn't appear at all when the unit is not currently in sight. Either of these should fix it.
I've tried both. None fixed the thing.
Every time models are seen under the fog (i'd like them to be seen), they are huge, no matter where scale is set in, at model or at actor. Seems like scale values just doesn't affect models under fog of war...
Make the unit visible through the fog and the actor not?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
I realize this is a necro, however I recently had the same problem and eventually came to the following conclusions. (Note: this has only been tested on a structure with an attachment). I thought I would paste my findings here to help others who might run into the same problem.
If the unit is scaling larger under the fog of war, but returns to normal size when in view, look into setting the Host+ on the attachment to _Selectable or _Unit. (and not to the unit its attaching to, i.e." the base") This occurs when a model attachment's scale has been increased and the actor for the model is trying to inherit model/actor scale from the "base". I'm not sure which setting to disable to prevent this, as they all gave varying result. In the end, its easier to leave the host attach as _Selectable and rely on the event create data to apply your attachment to your unit.
Unit "jumps" when being revealed/hidden by the fog of war. - If the unit is "jumping' under the fog of war, try recreating your base actor. There are apparently some problems with creating a unit/structure from scratch, namely that there are some events that prevent this jumping behavior in the fog of war (I'm not sure which ones, but probably hallucination detection). ("jumping" meaning, the actor/model height changes ingame/building starts floating, but the footprint (placement point) does not) -Attaching a SOpAdjust local offset of a minor amount to the base unit also fixes this problem, however the unit will (probably?) disappear in the editor
Depending on the solution you want, you can also set the fog of war visibility on the unit, or the actor. Just make sure iProperties: Inherit Properties+ is set to enable/disable visibility how you see fit. If enabled, ithe fog of war visibility will filter down the unit to each attachment that has it enabled. If you want it to pass down the type, the attachment has to have the item enabled in "Accepted property transfers"
@ckSynergy: Go
re re necro but setting a local offset on the base didnt fix my problem (model addtions were detached from host refered as "jumping"). i have attached spine crawlers to a tree unit with uberlisk method. my problem could be fixed by simply checking the FailOnNoHost under Host+ of the attachment actor. tested it several times and it seems to work now.