I'd like to gather some information about the use of Models as dialog items (via the trigger Create Dialog Item > Model).
My big question is "how do you use the Set Dialog Item Camera function?" The function requires a string for input and I have no idea what sort of arguments it might accept.
It would be nice to figure out how to make dialog item models rotate or change facing, even animate. Think of all the awesome things the SC2Mapster community could make!
...
Dialog - Create a Portrait for dialog (Last created dialog)
...
Dialog - Set (Last created dialog item) Model to Raynor Commando for (All players)
Portrait - Wait for (Get Portrait Id from (Last created dialog item)) to finish loading
Actor - Send message (SetScale 0.2, 0.2, 0.2 0.0) to actor (Actor for (Last created dialog item))
Make sure to wait until its loaded before sending messages to its actor.
Thanks, I got the model to appear. However, the set scale function isn't working. I used the "Wait for (portrait) to finish loading" function as you said.
My big question is "how do you use the Set Dialog Item Camera function?" The function requires a string for input and I have no idea what sort of arguments it might accept.
Just guessing here, but most standalone cameras are just models. So you might need to enter the file path or the model object id for a camera as a string.
€ there is also a data type camera, and there are camera strings used by portrait models mostly, like "Star2Camera01"
Just an update. I played around a bit and I was able to make the model show using the Create Dialog Item > Model function. You have to use "Dialog - Set (Last created dialog item) Unit Link to <Unit> for (All players)."
Unfortunately, I still seem unable to send SetScale messages to the actor of this dialog item.
EDIT: I've tried other actor messages as well such as Animation Play and SetTint, none of which had any discernible effect.
Another update. I tried setting the actor for the dialog item to a variable and it returns as "invalid." So I guess there really is no actor for dialog items and the "Actor from dialog item" function is broken and therefore worthless to me.
Im not quite sure why it didnt work for you. However, portraits are bugged as hell anyways especially when it comes to scale-actor messages. They just randomly dont work, also their scale gets reset once they get moved (already reported this on official forums)
Well that's weird. I definitely tested it with the message having 0 duration, didn't work, then changed the duration to 0.1 and it worked fine. I'm absolutely certain that's ALL that I changed. Maybe it depends on the type of model you use.
It didn't work for me, when I waited for the portrait to finish loading, but it worked, when I waited 2 seconds instead. So it probably only works after some time?
Like ive said, its just bugged. It might work, or not, depending on luck.
I also got an issue with weird blurred portraits where the Y scale seems smaller than it should be.
Portraits work very well as long as you dont try to mess with scale and just use normal portrait models. However, in the past this was even worse and that was the reason why we removed the 3D Portraits from SCU months ago. The "wait for portrait to load" could bug, causing it to wait forever and creating a thread that lasts forever. This could result in more than 1024 Threads what made the game crash.
This bug appears to be fixed right now, at least i couldnt see any weird behavior of this anymore, thats why im bringing back the 3D stuff to SCU slowly.
I wouldnt really go for a fixed wait time, since on different computers the portrait might take different time to load, so in theory its possible that it takes longer than 2 seconds to load (even though this is very unlikely, it could happen for very slow HDDs for example), so if it doesnt work with the "wait for portrait to load" action id probably just add another wait behind that action of about 0.1-0.5 seconds instead of using a fixed wait time.
In addition, if the portrait loads alot faster than 2 seconds you will have a very long delay between the portrait appearing and the actor message taking effect.
I know this is a bit dated, but here's some more information on dialog actors & unit models:
- dialog unit models use the "set dialog unit link" action.
- A portrait is stationary, which a unit model link will spin.
- "Set Dialog Camera" works for models or portraits.
You have a variety of options for the camera. All cameras appear to be internal (ie cant be found/modified?)
Camera Options:*
Star2Camera[x][y], where x = Lower, Higher, or Mid and y = the zoom out level.
Example: Star2CameraMid01 zooms the camera very close to the model, based on the unit's center.
Star2CameraHigher08 zooms the camera far away from the model, and moves the camera up by approximately unit height x2 (making the unit appear lower)
Star2CameraLower03 zooms the camera out a little, and moves the camera down, making the model appear higher. Again, based on the unit's height.
Tested and confirmed y values are 01-10
Setting a camera works instantly. If you use an actor messge to swap a model/actor of a unit model or portrait dialog, you must wait 2seconds before you can send another actor event. (sending actor events to dialogs is VERY slow, so its best to set as much as you can in data or cameras)
I'd like to gather some information about the use of Models as dialog items (via the trigger Create Dialog Item > Model).
My big question is "how do you use the Set Dialog Item Camera function?" The function requires a string for input and I have no idea what sort of arguments it might accept.
It would be nice to figure out how to make dialog item models rotate or change facing, even animate. Think of all the awesome things the SC2Mapster community could make!
Use portraits. They accept actor messages.
Could you please describe the functions you would use to make it appear properly with, say, the Raynor Commando actor?
Just making it appear. I think can figure out rotation on my own, unless you feel like explaining that too.
...
Dialog - Create a Portrait for dialog (Last created dialog)
...
Dialog - Set (Last created dialog item) Model to Raynor Commando for (All players)
Portrait - Wait for (Get Portrait Id from (Last created dialog item)) to finish loading
Actor - Send message (SetScale 0.2, 0.2, 0.2 0.0) to actor (Actor for (Last created dialog item))
Make sure to wait until its loaded before sending messages to its actor.
Thanks, I got the model to appear. However, the set scale function isn't working. I used the "Wait for (portrait) to finish loading" function as you said.
One step at a time :)
Just guessing here, but most standalone cameras are just models. So you might need to enter the file path or the model object id for a camera as a string.
€ there is also a data type camera, and there are camera strings used by portrait models mostly, like "Star2Camera01"
Just an update. I played around a bit and I was able to make the model show using the Create Dialog Item > Model function. You have to use "Dialog - Set (Last created dialog item) Unit Link to <Unit> for (All players)."
Unfortunately, I still seem unable to send SetScale messages to the actor of this dialog item.
EDIT: I've tried other actor messages as well such as Animation Play and SetTint, none of which had any discernible effect.
Another update. I tried setting the actor for the dialog item to a variable and it returns as "invalid." So I guess there really is no actor for dialog items and the "Actor from dialog item" function is broken and therefore worthless to me.
It works for portrait dialog items, I can scale and tint them. And since you can make them use any model, not just portrait models... well.
Hmm, alright. I changed it back to portrait and now it seems to work. I must have been doing it wrong. Thanks :)
EDIT: Figured out what I did. Apparently you need to specify a duration when setting the scale.
Duration 0 works fine for me. :)
Im not quite sure why it didnt work for you. However, portraits are bugged as hell anyways especially when it comes to scale-actor messages. They just randomly dont work, also their scale gets reset once they get moved (already reported this on official forums)
@Mille25: Go
Well that's weird. I definitely tested it with the message having 0 duration, didn't work, then changed the duration to 0.1 and it worked fine. I'm absolutely certain that's ALL that I changed. Maybe it depends on the type of model you use.
It didn't work for me, when I waited for the portrait to finish loading, but it worked, when I waited 2 seconds instead. So it probably only works after some time?
Like ive said, its just bugged. It might work, or not, depending on luck.
I also got an issue with weird blurred portraits where the Y scale seems smaller than it should be.
Portraits work very well as long as you dont try to mess with scale and just use normal portrait models. However, in the past this was even worse and that was the reason why we removed the 3D Portraits from SCU months ago. The "wait for portrait to load" could bug, causing it to wait forever and creating a thread that lasts forever. This could result in more than 1024 Threads what made the game crash.
This bug appears to be fixed right now, at least i couldnt see any weird behavior of this anymore, thats why im bringing back the 3D stuff to SCU slowly.
@Kueken531: Go
I wouldnt really go for a fixed wait time, since on different computers the portrait might take different time to load, so in theory its possible that it takes longer than 2 seconds to load (even though this is very unlikely, it could happen for very slow HDDs for example), so if it doesnt work with the "wait for portrait to load" action id probably just add another wait behind that action of about 0.1-0.5 seconds instead of using a fixed wait time.
In addition, if the portrait loads alot faster than 2 seconds you will have a very long delay between the portrait appearing and the actor message taking effect.
I know this is a bit dated, but here's some more information on dialog actors & unit models:
- dialog unit models use the "set dialog unit link" action.
- A portrait is stationary, which a unit model link will spin.
- "Set Dialog Camera" works for models or portraits.
You have a variety of options for the camera. All cameras appear to be internal (ie cant be found/modified?)
Example: Star2CameraMid01 zooms the camera very close to the model, based on the unit's center.
Star2CameraHigher08 zooms the camera far away from the model, and moves the camera up by approximately unit height x2 (making the unit appear lower)
Star2CameraLower03 zooms the camera out a little, and moves the camera down, making the model appear higher. Again, based on the unit's height.
Tested and confirmed y values are 01-10
Setting a camera works instantly. If you use an actor messge to swap a model/actor of a unit model or portrait dialog, you must wait 2seconds before you can send another actor event. (sending actor events to dialogs is VERY slow, so its best to set as much as you can in data or cameras)
@ckSynergy: Go
Also, here's some good information from Renee about the transition period for portraits and units:
http://us.battle.net/sc2/en/forum/topic/6758986076