I'm curious if anyone has found a way to do this. I'm attempting to create something similar to the "Available technology" item in the mission selection UI in the liberty campaign, basically a portrait that is a rotating unit model. I've been able to create a portrait using a unit, but the camera on the portrait is zoomed really close into the origin. I can't seem to figure out how to zoom the camera out or cause the camera or model to rotate.
You can send an actor message to the portrait and tell it to rescale the model. You'll need to test the scale for every unit type you want to show (A nice one for marines is 0.3). Rotation can be done with actor message to rotate + a loop (haven't tried it myself).
No idea how to actually control the camera of the portrait. Maybe we'll find out once they release Blizzard DotA and we get to poke around the triggers for the hero selection.
... or maybe they'll just put it in a restricted native function like with other cool stuff.
Excellent, the scale message worked perfectly. Now to figure out how set rotation works and how it receives parameters, I imagine it takes some kind of vector but it has just one large field to enter text into, and no matter what I put there nothing seems to happen. I had no idea you could access the portrait actor in this way though, so this was immensely useful.
Now to figure out how set rotation works and how it receives parameters, I imagine it takes some kind of vector but it has just one large field to enter text into, and no matter what I put there nothing seems to happen.
You don't have to guess what to put into that field, just switch to the function versions of actor messages (see attached picture, it was faster than explaining it in text).
Yeah I mean I looked through the functions, and I found some related to rotation, but I have no idea how to apply that value over time. I stopped messing around with it so it may be obvious after a few minutes, and I'm going to take a crack at it now, once that's out of the way looping it would be no issue at all.
After a few minutes of digging no obvious direct solution that I found. It seems like "Set rotation from" may be a workaround, if I spawn a turret actor in somewhere else, then set the rotation of the actor in the portrait to the rotation of the turret. But I have yet to test it, and don't feel like implementing a workaround if there's a better solution. I'm also fairly certain that "set rotation from" would need to be called constantly in order to achieve that affect, something that has obvious drawbacks.
Bump, I messed with using a turret actor to replicate this, but the constant rotation of a turret actor seems to be handled on the unit itself under idle. I didn't see any actor messages on the turret actor itself that appeared to make it rotate. Anyone have any ideas for making a portrait actor constantly rotate?
I found a way to do it. First make a real variable [Angle] that starts at 0.0, then create a trigger with a Repeat Forever loop, that [Make Actor Face Angle [Angle], then increase the [Angle] variable by 1. Add in a wait action for a certain amount of milliseconds to control the rotation's speed.
I'm curious if anyone has found a way to do this. I'm attempting to create something similar to the "Available technology" item in the mission selection UI in the liberty campaign, basically a portrait that is a rotating unit model. I've been able to create a portrait using a unit, but the camera on the portrait is zoomed really close into the origin. I can't seem to figure out how to zoom the camera out or cause the camera or model to rotate.
Any ideas?
You can send an actor message to the portrait and tell it to rescale the model. You'll need to test the scale for every unit type you want to show (A nice one for marines is 0.3). Rotation can be done with actor message to rotate + a loop (haven't tried it myself).
No idea how to actually control the camera of the portrait. Maybe we'll find out once they release Blizzard DotA and we get to poke around the triggers for the hero selection.
... or maybe they'll just put it in a restricted native function like with other cool stuff.
@Tolkfan: Go
Excellent, the scale message worked perfectly. Now to figure out how set rotation works and how it receives parameters, I imagine it takes some kind of vector but it has just one large field to enter text into, and no matter what I put there nothing seems to happen. I had no idea you could access the portrait actor in this way though, so this was immensely useful.
You don't have to guess what to put into that field, just switch to the function versions of actor messages (see attached picture, it was faster than explaining it in text).
@Tolkfan: Go
Yeah I mean I looked through the functions, and I found some related to rotation, but I have no idea how to apply that value over time. I stopped messing around with it so it may be obvious after a few minutes, and I'm going to take a crack at it now, once that's out of the way looping it would be no issue at all.
After a few minutes of digging no obvious direct solution that I found. It seems like "Set rotation from" may be a workaround, if I spawn a turret actor in somewhere else, then set the rotation of the actor in the portrait to the rotation of the turret. But I have yet to test it, and don't feel like implementing a workaround if there's a better solution. I'm also fairly certain that "set rotation from" would need to be called constantly in order to achieve that affect, something that has obvious drawbacks.
Bump, I messed with using a turret actor to replicate this, but the constant rotation of a turret actor seems to be handled on the unit itself under idle. I didn't see any actor messages on the turret actor itself that appeared to make it rotate. Anyone have any ideas for making a portrait actor constantly rotate?
@designerdougm: Go
I found a way to do it. First make a real variable [Angle] that starts at 0.0, then create a trigger with a Repeat Forever loop, that [Make Actor Face Angle [Angle], then increase the [Angle] variable by 1. Add in a wait action for a certain amount of milliseconds to control the rotation's speed.
View the result here: