I currently have 2 heroes in control of player 1, and I want the camera to be paned in the center on them (as if both are selected, and the player holds the right mouse button on the portrait). I cant' even understand how to pan the camera to the center of even 1 hero (yea I know).. but I noticed theres a unit group option as well as the follow unit. How do you use those?
While playing currently u begin with hero 1 in control, go up to a certain point, hero 2 spawns and the player now controls both of them. How can I make the camera pan to the center on hero 1 and then include hero 2 when the player gains control of him?
If you know any tutorial that explains that (or with the knowledge of doing this), please link it here. Thanks for your help.
@Mienk: Go
How do I create a new unit group? When trying to do "add unit to unit group" I can also select functions, none of them seem to create a new unit group, only one that "converts unit to a unit group", but than I cant select it with the "camera follow unit group" action.
I can do it in 1 line but then only on 1 hero instead of 2. Help please :)
I actually just made a tutorial on Unit Groups today; however it really depends upon how you have your units being spawned. If they're already preplaced them on your map then select your first hero and hit Numpad 0 Then hit Alt A then G You should now be in the Object Groups window and you should have an untitled Unit Group with only your first hero in it. Rename that to Heroes or something. Now when you're working with triggers and need to recall a Unit Group, you can find that entry in the Variables
If the heroes are spawned via triggers, it's almost just as easy. Go to the Object Group window and create an empty Unit Group and name that Heroes. Right after you spawn your 1st Hero run a trigger like this:
Add Unit (last spawned unit) to Unit Group: Heroes.
When it comes time for the 2nd hero, just do the same thing like you did for the first. If they maintain a distance from each other and you have the camera set to follow the Unit Group, it should be in the middle of them.
If I wasn't quiet clear, just follow this link to my tutorial
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I currently have 2 heroes in control of player 1, and I want the camera to be paned in the center on them (as if both are selected, and the player holds the right mouse button on the portrait). I cant' even understand how to pan the camera to the center of even 1 hero (yea I know).. but I noticed theres a unit group option as well as the follow unit. How do you use those? While playing currently u begin with hero 1 in control, go up to a certain point, hero 2 spawns and the player now controls both of them. How can I make the camera pan to the center on hero 1 and then include hero 2 when the player gains control of him?
If you know any tutorial that explains that (or with the knowledge of doing this), please link it here. Thanks for your help.
@Sevenspeed: Go
I would add both of those Heroes to a unit group and use the action "Follow Unit Group with Camera"
@Mienk: Go How do I create a new unit group? When trying to do "add unit to unit group" I can also select functions, none of them seem to create a new unit group, only one that "converts unit to a unit group", but than I cant select it with the "camera follow unit group" action.
I can do it in 1 line but then only on 1 hero instead of 2. Help please :)
@Sevenspeed: Go
I actually just made a tutorial on Unit Groups today; however it really depends upon how you have your units being spawned. If they're already preplaced them on your map then select your first hero and hit Numpad 0 Then hit Alt A then G You should now be in the Object Groups window and you should have an untitled Unit Group with only your first hero in it. Rename that to Heroes or something. Now when you're working with triggers and need to recall a Unit Group, you can find that entry in the Variables
If the heroes are spawned via triggers, it's almost just as easy. Go to the Object Group window and create an empty Unit Group and name that Heroes. Right after you spawn your 1st Hero run a trigger like this: Add Unit (last spawned unit) to Unit Group: Heroes.
When it comes time for the 2nd hero, just do the same thing like you did for the first. If they maintain a distance from each other and you have the camera set to follow the Unit Group, it should be in the middle of them.
If I wasn't quiet clear, just follow this link to my tutorial