I've googled the crap out of my problem for the past 6 hours or so and unfortunately I cant come up with much about my issue. I have exported a model using WMV and a old copy of WoW. Upon import the model works well, except that when I'm trying to add the a weapon (in this case a polearm) the weapon works fine until the unit does not move. When the unit is attacking in melee range, the polearm stays stationary, but upon moving the target or moving the unit to attack it works again. As long as the unit is moving, the animation works. I have tried the Marine trick (marine in the middle) as an attachment point, and the marine also stays stationary, either using hard points or SOp. I'm at wits end with this one and have little to no experience with model editors.
You must create the attachment actor in response to the unit's actor creation and not the unit's creation. Unit origin actors only receive attachment point updates when the unit moves, as they are intended for use as the unit's main actor only (actor is stationary when unit is stationary, no need to update). Actor origin actors receive attachment point updates every frame as they are intended as attachments on actors (parent attachment point is constantly animated so need to up update attachment every frame).
If the actor is created in response to a unit creation event then it will not update its attachment point when the unit stands still. If the actor is created in response to an actor creation event it will update its attachment point every frame.
EDIT: To Clarify...
To get this to work I recall one had to get the unit actor to create the attachment actor in response to its own actor creation. Over at Hive Workshop I posted a solution to this problem explaining in more detail with an example. Probably other events will also work for attachments, just not unit creation.
I've given it ago. Just to be safe I've tried this:
Created dummy marine (standard unit model applied to my pikeman unit)
In Events:
ActorCreation.DummyMarine
AttachModelOffset Pikeman {} {Origin 0}
In Pikeman model (Model ModelAddition)
ActorCreation.DummyMarine
Create
ActorCreation.Pikeman
AttachModelOffset Pike {} {Hardpoint 14}
WeaponStart.Pikeman.AttackStart
AnimPlay Attack Attack FullMatch.PlayForever
WeaponStop.Pikeman.AttackStop
AnimClear Attack
In Pike Model (Model ModelAddition)
ActorCreation.Pikeman
Create
Both ModelAddition accept Animator, Animation Properties, Position & Rotation.
The 'Pike' Model, which is the original addition to the Pikeman model stays attached which is good, and again moves with the unit, but upon attack animation it does not move only when moving does it update its position. I've also tried without the marine, and attaching the pike directly to the pikemen unit model at actor creation but again with the same problem.
SUPEREVIL I WANT YOUR BABIES OMG IT BLOODY WORKED! YOU'RE A GENIUS! ARGGGG CANT BELIEVE IT WAS SO SIMPLE :D :D :D YOU SAVED ME SO MUCH TROUBLE! PLZ MARK AS SOLVED!
Apologies for caps but I've been stuck on this for about 10 hours!
I've given it ago. Just to be safe I've tried this:
It appears you may have missed my post. The Pikeman actor has to create the Pike in response to its own actor creation.
Dummy Marine Actor: Delete this actor. No idea why this even exists...
Pikeman Unit Actor: Event -> Actor Creation // this implies self creation, no need to implicitly say Pikeman Action -> Create Pike
Pike Actor: NOTHING! No events inherently needed for the attachment to work.
Using this method I successfully attached a reactor to a flying starport so that the reactor tracks the bobbing animation of the starport even when standing still. Demonstration map is available at the link provided earlier but may or may not need you to login to download (no longer sure of THW's attachment policy).
Hi all,
I've googled the crap out of my problem for the past 6 hours or so and unfortunately I cant come up with much about my issue. I have exported a model using WMV and a old copy of WoW. Upon import the model works well, except that when I'm trying to add the a weapon (in this case a polearm) the weapon works fine until the unit does not move. When the unit is attacking in melee range, the polearm stays stationary, but upon moving the target or moving the unit to attack it works again. As long as the unit is moving, the animation works. I have tried the Marine trick (marine in the middle) as an attachment point, and the marine also stays stationary, either using hard points or SOp. I'm at wits end with this one and have little to no experience with model editors.
Things I've tried:
Interim Marine
Attaching Weapon with Hard Points
Using explicit rotation
Applying attachment via events
Using different attachment points
Anyone have any ideas on how to fix it?
You must create the attachment actor in response to the unit's actor creation and not the unit's creation. Unit origin actors only receive attachment point updates when the unit moves, as they are intended for use as the unit's main actor only (actor is stationary when unit is stationary, no need to update). Actor origin actors receive attachment point updates every frame as they are intended as attachments on actors (parent attachment point is constantly animated so need to up update attachment every frame).
If the actor is created in response to a unit creation event then it will not update its attachment point when the unit stands still. If the actor is created in response to an actor creation event it will update its attachment point every frame.
EDIT: To Clarify...
To get this to work I recall one had to get the unit actor to create the attachment actor in response to its own actor creation. Over at Hive Workshop I posted a solution to this problem explaining in more detail with an example. Probably other events will also work for attachments, just not unit creation.
I've given it ago. Just to be safe I've tried this:
Created dummy marine (standard unit model applied to my pikeman unit)
In Events:
ActorCreation.DummyMarine
AttachModelOffset Pikeman {} {Origin 0}
In Pikeman model (Model ModelAddition)
ActorCreation.DummyMarine
Create
ActorCreation.Pikeman
AttachModelOffset Pike {} {Hardpoint 14}
WeaponStart.Pikeman.AttackStart
AnimPlay Attack Attack FullMatch.PlayForever
WeaponStop.Pikeman.AttackStop
AnimClear Attack
In Pike Model (Model ModelAddition)
ActorCreation.Pikeman
Create
Both ModelAddition accept Animator, Animation Properties, Position & Rotation.
The 'Pike' Model, which is the original addition to the Pikeman model stays attached which is good, and again moves with the unit, but upon attack animation it does not move only when moving does it update its position. I've also tried without the marine, and attaching the pike directly to the pikemen unit model at actor creation but again with the same problem.
Using a SOp (Rotator) with 0 rotation speed can sometimes force the attachment to update.
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
SUPEREVIL I WANT YOUR BABIES OMG IT BLOODY WORKED! YOU'RE A GENIUS! ARGGGG CANT BELIEVE IT WAS SO SIMPLE :D :D :D YOU SAVED ME SO MUCH TROUBLE! PLZ MARK AS SOLVED!
Apologies for caps but I've been stuck on this for about 10 hours!
Wish I could but with the new site I have yet to find the button for my moderator powers.
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
Delete this actor. No idea why this even exists...
Pikeman Unit Actor:
Event -> Actor Creation // this implies self creation, no need to implicitly say Pikeman
Action -> Create Pike
Pike Actor:
NOTHING! No events inherently needed for the attachment to work.
Using this method I successfully attached a reactor to a flying starport so that the reactor tracks the bobbing animation of the starport even when standing still. Demonstration map is available at the link provided earlier but may or may not need you to login to download (no longer sure of THW's attachment policy).