I'm having a little visual bug where an attached Model Actor won't follow the motions of an attachment point. Here's a video showcasing the problem:
I checked in the cutscene editor and the starport's Overhead attachment moved with it as the model bobs up and down while it's lifted off. The problem I'm getting is that, as you can see, the attached Model Actors don't follow the subtle up and down airborne movements. Both the undeployed reactor and the turbine on top of the Starport are Model Actors. They're both hosted on the Unit Actor of the Starport. The attachment site operations used are, in this order:
- The default Overhead attachment
- A local offset site operations
Here's a screenshot of the events of the Turbine Model Actor:
you mean create another model actor with a tiny marine model (or the stock invisible model maybe?) which attaches to the overhead of the starport and then attach the turbine model actor to the marine?
EDIT: Well at first it seems work in the editor, but when I test it the attached models still refuse to follow the airborne up-and-down movements. I tried multiple models from marine, baneling, phoenix and the invisible model. All work in-editor, but don't once I test the map in-game.
PS: not sure if it's relevant information, but I'm testing this from a .SC2Mod file and spawning the units on Init with triggers.
Apologies for the double-post, but I asked the question on The Hive Workshop and user Dr Super Good (honestly though DSE and DSG were the same person initially, lol) gave this possible explanation of why it might not be working:
Quote from Dr Super Good:
The problem is that the attachment offset is only updated when the unit moves (position or rotation changed). While the unit is stationary the offset does not update so the attachments do not bob up and down with the starport. However if the starport is moving then the attachment positions are being updated and so it does bob up and down with the attachment points.
Currently I have found no solution to this. I think DrSuperEvil did but I recall it being hacky at best.
Some models just do not support dynamic attachment. Wonder if using Actor Creation to create it has the same issue? Or if the Unit actor uses the supporter fields to create the actor?
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I tried with Actor Creation but I can't get the model to appear. I don't have much experience with Actor Creation, I'm afraid.
As for supporter fields, I've never used those. How do I use that?
EDIT: DSG on Hive showed me how. The Actor Creation should be on the Unit Actor's events:
Yep. The only issue now is that the starport can upgrade into something else I need to find a way to create another Model Actor that's hosted on another Unit Actor. Is there a way to change the Host through Events or Triggers?
Not sure I understand how to use this. Tried setting the reference source to the Unit Actor of the base unit or even the upgraded unit on Morph finish, but it still doesn't host properly. The Model Actor of the upgraded unit is created in the events of the base unit's Unit Actor.
Set the Reference Name (reference whose entry you want to change) to ::Host and the Reference Source (what to change it to) to your new Unit actor. You put this event under your Model actor.
Maybe it would be easier to have the host of your model set to ::Creator then and have it recreated by the new unit actor?
I didn't actually know there was such a thing as ::Creator, though I'm not sure how to change one Unit Actor for another. Morphing abilities don't swap out the Unit Actors (I checked with triggers and the debugging text always returns the same actor after whatever morphing ability I used) and I'm not sure how I would replace the existing actor through events.
The Model Actors destroy and create nicely with the ::Creator method you suggested.
EDIT: Okay so I did a thing that appears to work, but might cause problem if the unit is killed. I destroy the Unit Actor on morph end and then on Actor Destruction I create the actor of the upgraded unit. Still getting some animation weirdness the first time I lift-off the starport after upgrade, but the main concern I have is that the starport can upgrade into 2 different kind of units, but I can't differentiate between either because right now the new Unit Actor is created on Actor Destruction. I can't use Actor Destruction to differentiate because it's the same base unit that can upgrade into the 2 variants. I'm hoping you could point me out to a term I can use to make the difference?
You can destroy the old and create the new. An alternative would be to use the Model Swap event action.
The creator system reference is set to the actor that used the Create event action to create the other actor.
Use the Morph ability for the actor creation like the zerg morphs do (eg. greater spire). You could also use a Validate Unit term that uses a Unit Type validator.
Not sure how the Model Swap thing would work out since doesn't seem to take GenericUnitStandard actors, but the Greater Spire trick did it! Many thanks, Doc. :D
I'm having a little visual bug where an attached Model Actor won't follow the motions of an attachment point. Here's a video showcasing the problem:
I checked in the cutscene editor and the starport's Overhead attachment moved with it as the model bobs up and down while it's lifted off. The problem I'm getting is that, as you can see, the attached Model Actors don't follow the subtle up and down airborne movements. Both the undeployed reactor and the turbine on top of the Starport are Model Actors. They're both hosted on the Unit Actor of the Starport. The attachment site operations used are, in this order:
- The default Overhead attachment
- A local offset site operations
Here's a screenshot of the events of the Turbine Model Actor:
Can anyone help me fix this?
Tried attaching an infinitely small marine and then attaching your model to that marine at the origin?
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
you mean create another model actor with a tiny marine model (or the stock invisible model maybe?) which attaches to the overhead of the starport and then attach the turbine model actor to the marine?
EDIT: Well at first it seems work in the editor, but when I test it the attached models still refuse to follow the airborne up-and-down movements. I tried multiple models from marine, baneling, phoenix and the invisible model. All work in-editor, but don't once I test the map in-game.
PS: not sure if it's relevant information, but I'm testing this from a .SC2Mod file and spawning the units on Init with triggers.
Apologies for the double-post, but I asked the question on The Hive Workshop and user Dr Super Good (honestly though DSE and DSG were the same person initially, lol) gave this possible explanation of why it might not be working:
Currently I have found no solution to this. I think DrSuperEvil did but I recall it being hacky at best.
Below is the download link to demo map of the unit setup in the exact same way it is in my .SC2Mod file. If anyone wants to take a crack at it, I would be grateful. http://www.hiveworkshop.com/attachments/invasionplatform_testmap-sc2map.249433/
(How do you embed link in text on this website? Most of the markups make no sense to me)
@Spellbound7: Go
ahahah, i remember when i used to have this problem - i went through heaven and hell finding a solution.
Don't use Unit Birth it's buggy.
Make a dummy behavior, give it to your unit
Actor Event
Behavior,BehaviorName,On
Create
For some reason, using Unit Birth only causes model attachments to work when the unit is actively moving. It doesn't work when the unit is static.
/sigh
Blizzard, why...
Thanks for figuring this out :)
Some models just do not support dynamic attachment. Wonder if using Actor Creation to create it has the same issue? Or if the Unit actor uses the supporter fields to create the actor?
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 tried with Actor Creation but I can't get the model to appear. I don't have much experience with Actor Creation, I'm afraid. As for supporter fields, I've never used those. How do I use that?
EDIT: DSG on Hive showed me how. The Actor Creation should be on the Unit Actor's events:
Actor Creation: Create.[YourModelActor]
This circumvents the use of UnitBirth
And does it fix the issue?
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
Yep. The only issue now is that the starport can upgrade into something else I need to find a way to create another Model Actor that's hosted on another Unit Actor. Is there a way to change the Host through Events or Triggers?
Use a Reference Set event action.
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
Not sure I understand how to use this. Tried setting the reference source to the Unit Actor of the base unit or even the upgraded unit on Morph finish, but it still doesn't host properly. The Model Actor of the upgraded unit is created in the events of the base unit's Unit Actor.
Set the Reference Name (reference whose entry you want to change) to ::Host and the Reference Source (what to change it to) to your new Unit actor. You put this event under your Model actor.
Maybe it would be easier to have the host of your model set to ::Creator then and have it recreated by the new unit actor?
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 didn't actually know there was such a thing as ::Creator, though I'm not sure how to change one Unit Actor for another. Morphing abilities don't swap out the Unit Actors (I checked with triggers and the debugging text always returns the same actor after whatever morphing ability I used) and I'm not sure how I would replace the existing actor through events.
The Model Actors destroy and create nicely with the ::Creator method you suggested.
EDIT: Okay so I did a thing that appears to work, but might cause problem if the unit is killed. I destroy the Unit Actor on morph end and then on Actor Destruction I create the actor of the upgraded unit. Still getting some animation weirdness the first time I lift-off the starport after upgrade, but the main concern I have is that the starport can upgrade into 2 different kind of units, but I can't differentiate between either because right now the new Unit Actor is created on Actor Destruction. I can't use Actor Destruction to differentiate because it's the same base unit that can upgrade into the 2 variants. I'm hoping you could point me out to a term I can use to make the difference?
You can destroy the old and create the new. An alternative would be to use the Model Swap event action.
The creator system reference is set to the actor that used the Create event action to create the other actor.
Use the Morph ability for the actor creation like the zerg morphs do (eg. greater spire). You could also use a Validate Unit term that uses a Unit Type validator.
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
Not sure how the Model Swap thing would work out since doesn't seem to take GenericUnitStandard actors, but the Greater Spire trick did it! Many thanks, Doc. :D
The model swap just changes the model used by the actor.
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