I'm not sure if its possible but when you are about to place a building during the game. Can I make it rotate by press R for example.
Some games have a fancy drag to select direction plus with an arrow facing front. But I'd be happy with a simple press R to rotate 90°. How about would I go to change the placement model and actual model by a button press.
So far I can change the inital rotation of the building.
But this is fixed and I want it to be turnable. I'm curious on how I can change this value between fixed values like 90, 180, 270 and 360 based on a button press.
The value I want to change is : Field BarracksField Barracks(Basic) Stats: Facing 90.000000
I'm trying to research it but not quiet sure what to look for that triggers this change.
Make Actor Face Angle could be used for the placement actor and Make Unit Face Angle for the structure once placed. You also would need a local variable to store the angle.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
From what I understand both "triggering unit" and "last created actor" refere to "things" created through triggers. So how can I detect the Placement model that follows the cursor. And the last placed unit on the map?
I would advise looking into how Blizzard has made the Skeletal Mage ultimate for Xul in Heroes of the Storm. The most recent version of it summons units in an orientation that are rotated by dragging your mouse cursor before releasing. Since HotS is based on the same engine as SC2 it is possible the same mechanics can be used, assuming there have not been too many major diversions between the game engines.
If using such mechanics is possible, one would create a unit at the initial target and then rotate it to the drag vector, using triggers if required.
I've installed/extracted the following out of HOTS. I checked for triggers but don't seem like they used anything for this character to rotate. But as you mentioned "vector". It has a vector assigned here <CEffectCreatePersistent id="NecromancerSkeletalMagesOffsetPersistent">
Now I've been through this for it for a bit and I assume that you can't make it work in starcraft 2 with just Data. How would I make it work?
I tried replicating the settings from the skeletal mages but it just puts the finished building in place without able to rotate it (finished building as in it skipped the constructing part) I also failed to make the Placement model to work. Not great but ver interesting learning process to compare with HOTS thanks for that tip!
I doubt any triggers were used for the ability. The actor data is where you will find your answer. Looks like the actor uses "drag" on the effect. Not sure if sc2 has that.
I'm not sure if its possible but when you are about to place a building during the game. Can I make it rotate by press R for example.
Some games have a fancy drag to select direction plus with an arrow facing front. But I'd be happy with a simple press R to rotate 90°. How about would I go to change the placement model and actual model by a button press.
Use triggers.
(Moved to a more appropriate forum)
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
So far I can change the inital rotation of the building.
But this is fixed and I want it to be turnable. I'm curious on how I can change this value between fixed values like 90, 180, 270 and 360 based on a button press.
The value I want to change is : Field BarracksField Barracks(Basic) Stats: Facing 90.000000
I'm trying to research it but not quiet sure what to look for that triggers this change.
Make Actor Face Angle could be used for the placement actor and Make Unit Face Angle for the structure once placed. You also would need a local variable to store the angle.
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
In reply to DrSuperEvil:
From what I understand both "triggering unit" and "last created actor" refere to "things" created through triggers. So how can I detect the Placement model that follows the cursor. And the last placed unit on the map?
I would advise looking into how Blizzard has made the Skeletal Mage ultimate for Xul in Heroes of the Storm. The most recent version of it summons units in an orientation that are rotated by dragging your mouse cursor before releasing. Since HotS is based on the same engine as SC2 it is possible the same mechanics can be used, assuming there have not been too many major diversions between the game engines.
If using such mechanics is possible, one would create a unit at the initial target and then rotate it to the drag vector, using triggers if required.
In reply to Forge_User_04585675:
Full file available here: https://pastebin.com/0N0yVY86
I doubt any triggers were used for the ability. The actor data is where you will find your answer. Looks like the actor uses "drag" on the effect. Not sure if sc2 has that.
In reply to Prodigy454: