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.
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!