Staredit Network > Forums > SC2 Assistance > Topic: Rotate a units turret - Triggeres
Rotate a units turret - Triggeres
Dec 26 2010, 4:44 pm
By: NicholasBeige  

Dec 26 2010, 4:44 pm NicholasBeige Post #1





The first Msg it sends is this: AttachSetPosition {TurretZ} 23.0, 45.0, 9.5

23.0 = Unit X position
45.0 = Unit Y Position
9.5 = Terrain height at Unit Position + Turret Offset (0.5)

The second Msg it sends is this: AttachSetRotation {TurretZ} 0.9, -0.6
0.9 = (Position of mouse click X - X Unit Position)
-0.6 = (Position of mouse click Y - Y Unit Position)

Any helps please? It just doesn't work like it's supposed to. The turret doesn't detach from the unit model (which is apparently what it's supposed to do if you give it a AttachSetRotation message. Which is why there is the AttachSetPosition message also. Any helpz plox



None.

Dec 26 2010, 5:03 pm NicholasBeige Post #2





This is something like what the outcome should be. You'll notice how jittery the turret is because of it being detached and AttachSetPosition having to manually update it's location.

I guess I'll either wait for a reply in here or wait for patch 1.3 to come out with Mouse-Location functionality....

Even thought it's already possible using a custom trigger library with lots of custom functions etc...
It'll just be easier when Blizzard allow us to use GetMousePosition(x,y)




None.

Dec 26 2010, 11:18 pm doite Post #3



Well there is another way. Make the tank be able to attack while moving. Then create a unit which is invisable and which the tank tries to attack. Move the unit depending on the yaw of the camera with an ofset from tank. There u have a rotating tank turret



None.

Dec 27 2010, 5:39 pm NicholasBeige Post #4



And what happens when there are 4 players, each with a tank, with each spawning this 'invisable' unit at their cursors periodically? How will each tank know which target is for it to shoot at. And how about making the tanks turret face where this unit is? I'd have to go through the long-winded process of GetMousePosition through a huge trigger library, which is exactly what I don't want to do. Since this will lag loads for anything more than 1 player - until Blizzard release patch 1.3.

No thanks - I'd rather do this properly.

Post has been edited 1 time(s), last time on Dec 27 2010, 6:45 pm by Cardinal.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
[2024-4-20. : 7:56 pm]
Oh_Man -- lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
Please log in to shout.


Members Online: MetalGear