I'm trying to create a three-headed hydra using data editor. At this point, it would have been faster to $%&# open max and do it that way.
My thinking was to have the base model, and have two other models, scaled down and rotated by about 15 or so degrees.
So, I tried to get around that and use turrets to rotate stuff. In addition to being too retarded to get the attachments to work right, I've yet to figure out how to get the turret to change by roll instead of yaw.
That would be something that would be pretty interesting to see. You say you were having problems with the site operations correct? Have you tried switching around the order in which they are applied? I know that sometimes certain Site Ops have a tendency of overwriting each other if not applied in the right order.
Okay, so there are no attachment points on the hydralisk (and I'm guessing most models) which point backwards (changing the "up" of the attachment point would change the axis of rotation).
If I could get a turret properly attached that had it's "up" changed to "backward", this could be pulled off, but I have been unsuccessful in changing facing direction.
I did a re-scouring of ProzaicMuse's tutorials, created a turret, and successfully got the hydralisk to attach to a turret that would theoretically allow it to rotate along that axis. I then tried copying some code found around sc2mapster to rotate the turret, but have had no luck implementing it.
I'm not even 100% sure that I'm trying to rotate the right actor.
I have the unit, which has a Turret Body (type: model) attached to it, there's an actor type turret that uses that, and a model attached to the head of the turret. All of this is more or less copy-pasted from ProzaicMuse's Uberlisk tutorial, verified on turret tutorials, etc.
Figured id throw my input in here, i just got done messing with these functions for the last hour or so. Was shooting for a flame coming off the end of the marine rifle, and tried damn near every single attach point before doing a mix of attach points and the offset. Attach points that were the correct ones, were appearing on the ground without any offset inputs.
Hit things with a fresh head this morning and made some progress.
I took turret rotation code from a test map made by s3rius, and have been attempting to adapt it.
rotateEventsGame-PlayerAnyPlayertypesachatmessagecontaining"rotate",matchingExactlyLocalVariablesc=0.0<Real[3]>
f = 0.0 <Real>
myUnit = No Unit <Unit>
turret_actor = No Actor <Actor>
Conditions
Actions
Variable - Set myUnit = Boss 1 - Three-Headed Hydra [48.90,17.90]
Variable - Set turret_actor = (Actor connected to (Actor for myUnit) via reference "::global.HydraTurretBody")
General - Custom Script:
lv_c[0]=PointGetX(UnitGetPosition(lv_myUnit));
lv_c[1]=PointGetY(UnitGetPosition(lv_myUnit));
lv_c[2]=8.5;
lv_f+=0.02;
if (lv_f>1){
lv_f=-1;
}
ActorSend(lv_turret_actor, "AttachSetRotation {TurretZ 0} -0.707107,"+FixedToString(lv_f,6)+",-0.000000");
ActorSend(lv_turret_actor, "AttachSetPosition {TurretZ 0} "+FixedToString(lv_c[0],6)+","+FixedToString(lv_c[1],6)+","+FixedToString(lv_c[2],6));
So, pre-rotate, things currently look like this:
Notice that the hydralisk, it's attached (oversized for visual ease) "head", the top of the photon cannon turret actor, and the regular unit (drone) are all facing south.
The actors for that look a little like this:
And the result after rotating looks like this:
Meaning that something is definitely wrong with the numbers I poorly tried to plug in for rotation. My first guess would be the unit coordinates, but since the turret actor is attached to the unit at the origin, I would think X,Y,Z coordinates would be the same for each...but I guess the turret head isn't at the origin anymore, since it's not "on top" of the turret, but rather "in front" of it (pointing southwards instead of upwards).
But this is just a theory, and I'm not sure what else has to be altered to compensate for changing the axis of rotation.
I'm trying to create a three-headed hydra using data editor. At this point, it would have been faster to $%&# open max and do it that way. My thinking was to have the base model, and have two other models, scaled down and rotated by about 15 or so degrees.
APPARENTLY models can be rotated via pitch and yaw (z and x axis, I think), but blizzard has some sort of hatred of barrel rolls, because rotating roll is impossible [source: http://forums.sc2mapster.com/development/map-development/902-rotating-units-around-x-or-y-axis/]. And, if that citation is correct, has been impossible since beta with no resolution.
So, I tried to get around that and use turrets to rotate stuff. In addition to being too retarded to get the attachments to work right, I've yet to figure out how to get the turret to change by roll instead of yaw.
So. Three-Headed Hydra. Anyone?
Hey Syco!
That would be something that would be pretty interesting to see. You say you were having problems with the site operations correct? Have you tried switching around the order in which they are applied? I know that sometimes certain Site Ops have a tendency of overwriting each other if not applied in the right order.
Yes, I have played around with that, to no avail :(
Okay, so there are no attachment points on the hydralisk (and I'm guessing most models) which point backwards (changing the "up" of the attachment point would change the axis of rotation).
If I could get a turret properly attached that had it's "up" changed to "backward", this could be pulled off, but I have been unsuccessful in changing facing direction.
I did a re-scouring of ProzaicMuse's tutorials, created a turret, and successfully got the hydralisk to attach to a turret that would theoretically allow it to rotate along that axis. I then tried copying some code found around sc2mapster to rotate the turret, but have had no luck implementing it.
I'm not even 100% sure that I'm trying to rotate the right actor.
I have the unit, which has a Turret Body (type: model) attached to it, there's an actor type turret that uses that, and a model attached to the head of the turret. All of this is more or less copy-pasted from ProzaicMuse's Uberlisk tutorial, verified on turret tutorials, etc.
@SycoPrime: Go
Figured id throw my input in here, i just got done messing with these functions for the last hour or so. Was shooting for a flame coming off the end of the marine rifle, and tried damn near every single attach point before doing a mix of attach points and the offset. Attach points that were the correct ones, were appearing on the ground without any offset inputs.
heres the post and what i did http://forums.sc2mapster.com/development/data/10967-attaching-a-model-to-the-end-of-a-marine-rifle-solved/#p6
@SycoPrime: Go
SOp180?
Sorry Im not completely sure what the problem is *shrug*
Hit things with a fresh head this morning and made some progress.
I took turret rotation code from a test map made by s3rius, and have been attempting to adapt it.
So, pre-rotate, things currently look like this:
Notice that the hydralisk, it's attached (oversized for visual ease) "head", the top of the photon cannon turret actor, and the regular unit (drone) are all facing south.
The actors for that look a little like this:
And the result after rotating looks like this:
Meaning that something is definitely wrong with the numbers I poorly tried to plug in for rotation. My first guess would be the unit coordinates, but since the turret actor is attached to the unit at the origin, I would think X,Y,Z coordinates would be the same for each...but I guess the turret head isn't at the origin anymore, since it's not "on top" of the turret, but rather "in front" of it (pointing southwards instead of upwards).
But this is just a theory, and I'm not sure what else has to be altered to compensate for changing the axis of rotation.
So...still no idea how to roll a unit or properly rotate an alternative-axis turret?