So I have this unit. On it's UnitActor, it has an invisible model hosted on it's head attachments. That invisible model is host to a ModelActor (using the Korhal Cannon). The inivisible model is a turret and rotates as it should, but the attached Korhal Canon does not. I tried replacing the Cannon with a phoenix model and a baneling model and they still do not rotate. That's problem 1.
Problem 2 is the fact that I need the weapon of the Cannon to fire from the tip of the Cannon, which is Weapon00. The UnitActor of the ship attacks, and the missile should launch from the Cannon tip. I've been unsuccessful at making this work so far. Looking at things like launch queries and whatnot just confuses me further.
1) So you have a Unit actor, that has an attached invisible actor (what type?) that has a Model actor attached to that.
I would suggest that you check the scope bearing tracking. I would hazard to guess that the Cannon model is getting its bearings (direction) from the unit, not the turret.
2) You need to check the Action actor associated with the launch missile effect. Since the missile is created from the scope of the caster, you will need to adjust which actor it considers the launch from. I'll look into this more later.
1) The invisible model is a Model Actor. I tried to change the Scope Bearing Tracking on the Cannon's Model Actor to all 3 options but it didn't do anything.
1. I did. The invisible model itself it the thing that rotates. I set the model to a phoenix just to be sure that it actually turns and it indeed turns. For some reason the Cannon model attached to the invisible model/phoenix doesn't not rotate. Both the invisible model and the Cannon have Position and Rotation as Accepted Transfers.
2. I made a Site actor that has the Cannon model as Host. The Site is created when the Unit Actor is created. In the Action I set the Launch Site to the aforementioned Site Actor. Strangely enough, when I look at the actors in the weapon tab, the Site actor doesn't show up. Then In the Site's Host Site Operations + I set it to SOpAttachWeapon, but the missile is still launching from the ground at the center of the UnitActor.
Have you tried while the unit is moving? Some models do not update unless the unit is moving ( a work around is to use a SOp (Rotator) with 0 speed). What attachment point are you attaching your cannon to?
Check that the Art: Beam field does not have an incorrect entry on your Action actor. Launching from the origin of the host actor implies your Action actor is failing to be created.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Tried the rotator thing already. Didn't work :( I have the Cannon Hosted on the invisible model that rotates, and the Site Operations is SOpAttachOrigin.
The Art: Beam has the same value as the Art: Missile, which is the actor of the missile that gets launched. In the Events, this line exists by default:
Effect.AntiMatterLM.Start
- At Caster
Create
So, as far as I can tell, there's no reason why the Action actor isn't being created.
PS: what are the Events that go inside the Site actor? Currently it's UnitBirth.Ship > Create
Well the first sentence of your response had your solution. The turret is a different attachment point from the origin. The origin is where the model is attached to its host while the turning part is a different attachment point. Attach to the TurretZ.
Make the Art: beam field the default value otherwise it conflicts with the Art: Missile field value and causes the actor to fail to be created.
Since HOTS the Site actors do not need to be created separately. Now they are automatically created by the Action on use.
Here is one of my work in progress maps where I use a Site actor. Also before you mention it I know I adjusted the gun angle to follow Newtonian ballistics as opposed to blizzard which seems to only use the x distance in the calculations.
By TurretZ I assume you mean SOpAttachTurret? I actually did try SOpAttachTurret before I tried Origin and still the Cannon would not turn. The model actor onto which the Cannon is Hosted does turn. I tried Hosting the Cannon on Creator since the invisible model is the model that creates the Cannon on Actor Creation.
Reseting Art: Beam to default value did not fix the Site problem.
I did take a look at your map and... I don't understand anything xD I don't even know what Newtonian ballistics is. :P
That is a default SOp (Attachment) actor that should attach to the correct attachment point. You would have to look in the cutscene editor to be sure. With some models you needed to attach to the weapon of the turret (the autoturret of the raven had that issue).
Newtonian ballistics is high school physics about projectiles. This Wikipedia page gives a good summary of the relation of angle of launch and velocity to distance.
In the demo map I have an ability for the artillery that makes the gun follow the cursor. When cast there is a persistent that launches periodic missiles until told to shoot elsewhere. The cannon uses two invisible marines as sticks to move the parts of the barrel WWII battleship style. The only thing you need to look at is the Site and Action actor. I use the site to launch the projectiles from the tip of the cannon.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I tried changing the invisible model to a phoenix and it still wouldnt turn when I attach the Cannon to it's SOpAttachTurret.
As for the site, I'm doing the exact same thing (well, following the idea) of what you did in your demo map and it still isn't working :( The Action has the Site I created and the Site itself has the Cannon as host, and SOpAttachWeapon as Site Operations. I checked in the custscene editor and the Cannon model indeed has a weapon attachment.
So I have this unit. On it's UnitActor, it has an invisible model hosted on it's head attachments. That invisible model is host to a ModelActor (using the Korhal Cannon). The inivisible model is a turret and rotates as it should, but the attached Korhal Canon does not. I tried replacing the Cannon with a phoenix model and a baneling model and they still do not rotate. That's problem 1.
Problem 2 is the fact that I need the weapon of the Cannon to fire from the tip of the Cannon, which is Weapon00. The UnitActor of the ship attacks, and the missile should launch from the Cannon tip. I've been unsuccessful at making this work so far. Looking at things like launch queries and whatnot just confuses me further.
Need help with those :\
1) So you have a Unit actor, that has an attached invisible actor (what type?) that has a Model actor attached to that.
I would suggest that you check the scope bearing tracking. I would hazard to guess that the Cannon model is getting its bearings (direction) from the unit, not the turret.
2) You need to check the Action actor associated with the launch missile effect. Since the missile is created from the scope of the caster, you will need to adjust which actor it considers the launch from. I'll look into this more later.
1. You created a Turret actor? Without one turrets do not turn.
2. Use a Site type actor and make the Action actor used by the weapon use that site. You can then offset it using a SOp (Local Offset) SOp 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
@ArcaneDurandel: Go
1) The invisible model is a Model Actor. I tried to change the Scope Bearing Tracking on the Cannon's Model Actor to all 3 options but it didn't do anything.
@DrSuperEvil: Go
1. I did. The invisible model itself it the thing that rotates. I set the model to a phoenix just to be sure that it actually turns and it indeed turns. For some reason the Cannon model attached to the invisible model/phoenix doesn't not rotate. Both the invisible model and the Cannon have Position and Rotation as Accepted Transfers.
2. I made a Site actor that has the Cannon model as Host. The Site is created when the Unit Actor is created. In the Action I set the Launch Site to the aforementioned Site Actor. Strangely enough, when I look at the actors in the weapon tab, the Site actor doesn't show up. Then In the Site's Host Site Operations + I set it to SOpAttachWeapon, but the missile is still launching from the ground at the center of the UnitActor.
Have you tried while the unit is moving? Some models do not update unless the unit is moving ( a work around is to use a SOp (Rotator) with 0 speed). What attachment point are you attaching your cannon to?
Check that the Art: Beam field does not have an incorrect entry on your Action actor. Launching from the origin of the host actor implies your Action actor is failing to be created.
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
Tried the rotator thing already. Didn't work :( I have the Cannon Hosted on the invisible model that rotates, and the Site Operations is SOpAttachOrigin.
The Art: Beam has the same value as the Art: Missile, which is the actor of the missile that gets launched. In the Events, this line exists by default:
Effect.AntiMatterLM.Start
- At Caster
Create
So, as far as I can tell, there's no reason why the Action actor isn't being created.
PS: what are the Events that go inside the Site actor? Currently it's UnitBirth.Ship > Create
Well the first sentence of your response had your solution. The turret is a different attachment point from the origin. The origin is where the model is attached to its host while the turning part is a different attachment point. Attach to the TurretZ.
Make the Art: beam field the default value otherwise it conflicts with the Art: Missile field value and causes the actor to fail to be created.
Since HOTS the Site actors do not need to be created separately. Now they are automatically created by the Action on use.
Here is one of my work in progress maps where I use a Site actor. Also before you mention it I know I adjusted the gun angle to follow Newtonian ballistics as opposed to blizzard which seems to only use the x distance in the calculations.
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
By TurretZ I assume you mean SOpAttachTurret? I actually did try SOpAttachTurret before I tried Origin and still the Cannon would not turn. The model actor onto which the Cannon is Hosted does turn. I tried Hosting the Cannon on Creator since the invisible model is the model that creates the Cannon on Actor Creation.
Reseting Art: Beam to default value did not fix the Site problem.
I did take a look at your map and... I don't understand anything xD I don't even know what Newtonian ballistics is. :P
That is a default SOp (Attachment) actor that should attach to the correct attachment point. You would have to look in the cutscene editor to be sure. With some models you needed to attach to the weapon of the turret (the autoturret of the raven had that issue).
Newtonian ballistics is high school physics about projectiles. This Wikipedia page gives a good summary of the relation of angle of launch and velocity to distance.
https://en.wikipedia.org/wiki/Trajectory_of_a_projectile
In the demo map I have an ability for the artillery that makes the gun follow the cursor. When cast there is a persistent that launches periodic missiles until told to shoot elsewhere. The cannon uses two invisible marines as sticks to move the parts of the barrel WWII battleship style. The only thing you need to look at is the Site and Action actor. I use the site to launch the projectiles from the tip of the cannon.
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 changing the invisible model to a phoenix and it still wouldnt turn when I attach the Cannon to it's SOpAttachTurret.
As for the site, I'm doing the exact same thing (well, following the idea) of what you did in your demo map and it still isn't working :( The Action has the Site I created and the Site itself has the Cannon as host, and SOpAttachWeapon as Site Operations. I checked in the custscene editor and the Cannon model indeed has a weapon attachment.
Upload your map and I will have a look.
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