Hey guys, searched all over the place for info on doors, and keep getting a lot of convoluted reports. So I figure I'd ask some questions here as well as slowly edit this post with more and more info on them for those of us who are still searching.
Door and Gate Models: Most of them can be found using the liberty campaign dependency, I don't think there are any in the basic game.
DrSuperEvil: gates have two units and usually share a model. The units swap between each other using a Morph ability and usually use events on the actor to add/remove animation groups. Each unit has a different footprint for pathing.
Closing Gates: to properly close gates via data, you must be sure to give your open gate/door the proper close command. Most gates have the correct open door ability set by default, but don't have their close ability set.
An Open/Close command is a morph ability that cycles between the two door states.
Different door and gate models have different animation names for their open/close states. I highly recommend duplicating some pre-made data for your doors, just be sure to set the animations that are played when the ability is used in the actor tab for your door.
You can make your door Automatic by giving your morph abilities the "automatic" flags (this will cause your gate to continuously open and close itself in game), then give the morph open ability an enumerate area validator (I based mine of No Enemy Units then just changed it to search for allied units as well)
Also be sure to give the morph closed ability a validator as well, just copy paste your last one and change the search are to become "equal to" "0" then set the validator "compare" field to "equal to"
The gates already trying to open and close itself, now it will make sure there are no units around before it closes, and that if there are units around, it will open.
In my case, I plan on being able to weld or lock a door shut, in order to use it as a barricade, which I have done by making a seperate open/close ability that toggles the door to a third unit, one that will not open or close automatically. (This is useful for me because the doors in my game are not selectable, those who want to use doors as a selectable unit may want to find another way) By doing this I simply made a second target unit ability that issues an order to the door, which switches it to the welded version, and forcing it to stay shut.
It would also be cool to make an "interact" ability, that when cast opens and closes doors You could probably do this by making an instant cast ability that when used, applies a unique buff to the casting unit, then, make the enumerate area validator also check to see if said unit has the buff. Then when the buff wheres off, the door should close once again.
DrSuperEvil: I would advise a Effect - Instant effect that uses a Search Area effect which uses a validated Set effect before using a Switch that uses an Apply/Remove Behavior effect based on the gate buff count. The validator is of a Unit Type type of validator that looks for the tech tree alias of the unit (like the one that looks for hive/supply depot and the upgrades).
Speaking of interact abilities, the ingame interact ability (in the literal sense) can be used to give shared control of the unit. If you do this, you can avoid the automatic door all together, and just have players select the door and toggle it's states manually.
Alot of the SM doors appear misplaced for some reason,
DrSuperEvil: just use SOp (Local Offset) and SOp (Explicit Rotation) SOps to fix.
The easiest way to manage doors and gates are via triggers, using a region to check when a unit enters or leaves it, then opening and closing the door respectively, Though..
DrSuperEvil: Triggers are only good for complex opening conditions/linked groups of doors.
with any luck this thread will end up making doors like these:
Actually gates have two units and usually share a model. The units swap between each other using a Morph ability and usually use events on the actor to add/remove animation groups. Each unit has a different footprint for pathing.
You just looked at my gate for the community project didnt you.
The Interact ability does not work like that. It can give you shared control of the unit however. I would advise a Effect - Instant effect that uses a Search Area effect which uses a validated Set effect before using a Switch that uses an Apply/Remove Behavior effect based on the gate buff count. The validator is of a Unit Type type of validator that looks for the tech tree alias of the unit (like the one that looks for hive/supply depot and the upgrades).
Yes, as most SM doors are cinematics they are at odd camera pleasing offsets/angles. Infact most SM stuff has that issue, just use SOp (Local Offset) and SOp (Explicit Rotation) SOps to fix.
Triggers are only good for complex opening conditions/linked groups of doors.
ATTACHMENTS
Zerg_Gate.jpg
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Hey guys, searched all over the place for info on doors, and keep getting a lot of convoluted reports. So I figure I'd ask some questions here as well as slowly edit this post with more and more info on them for those of us who are still searching.
Door and Gate Models: Most of them can be found using the liberty campaign dependency, I don't think there are any in the basic game.
DrSuperEvil: gates have two units and usually share a model. The units swap between each other using a Morph ability and usually use events on the actor to add/remove animation groups. Each unit has a different footprint for pathing.
Closing Gates: to properly close gates via data, you must be sure to give your open gate/door the proper close command. Most gates have the correct open door ability set by default, but don't have their close ability set.
An Open/Close command is a morph ability that cycles between the two door states.
Different door and gate models have different animation names for their open/close states. I highly recommend duplicating some pre-made data for your doors, just be sure to set the animations that are played when the ability is used in the actor tab for your door.
You can make your door Automatic by giving your morph abilities the "automatic" flags (this will cause your gate to continuously open and close itself in game), then give the morph open ability an enumerate area validator (I based mine of No Enemy Units then just changed it to search for allied units as well)
Also be sure to give the morph closed ability a validator as well, just copy paste your last one and change the search are to become "equal to" "0" then set the validator "compare" field to "equal to"
The gates already trying to open and close itself, now it will make sure there are no units around before it closes, and that if there are units around, it will open.
In my case, I plan on being able to weld or lock a door shut, in order to use it as a barricade, which I have done by making a seperate open/close ability that toggles the door to a third unit, one that will not open or close automatically. (This is useful for me because the doors in my game are not selectable, those who want to use doors as a selectable unit may want to find another way) By doing this I simply made a second target unit ability that issues an order to the door, which switches it to the welded version, and forcing it to stay shut.
It would also be cool to make an "interact" ability, that when cast opens and closes doors You could probably do this by making an instant cast ability that when used, applies a unique buff to the casting unit, then, make the enumerate area validator also check to see if said unit has the buff. Then when the buff wheres off, the door should close once again.
DrSuperEvil: I would advise a Effect - Instant effect that uses a Search Area effect which uses a validated Set effect before using a Switch that uses an Apply/Remove Behavior effect based on the gate buff count. The validator is of a Unit Type type of validator that looks for the tech tree alias of the unit (like the one that looks for hive/supply depot and the upgrades).
Speaking of interact abilities, the ingame interact ability (in the literal sense) can be used to give shared control of the unit. If you do this, you can avoid the automatic door all together, and just have players select the door and toggle it's states manually.
Alot of the SM doors appear misplaced for some reason,
DrSuperEvil: just use SOp (Local Offset) and SOp (Explicit Rotation) SOps to fix.
The easiest way to manage doors and gates are via triggers, using a region to check when a unit enters or leaves it, then opening and closing the door respectively, Though..
DrSuperEvil: Triggers are only good for complex opening conditions/linked groups of doors.
with any luck this thread will end up making doors like these:
Actually gates have two units and usually share a model. The units swap between each other using a Morph ability and usually use events on the actor to add/remove animation groups. Each unit has a different footprint for pathing.
You just looked at my gate for the community project didnt you.
The Interact ability does not work like that. It can give you shared control of the unit however. I would advise a Effect - Instant effect that uses a Search Area effect which uses a validated Set effect before using a Switch that uses an Apply/Remove Behavior effect based on the gate buff count. The validator is of a Unit Type type of validator that looks for the tech tree alias of the unit (like the one that looks for hive/supply depot and the upgrades).
Yes, as most SM doors are cinematics they are at odd camera pleasing offsets/angles. Infact most SM stuff has that issue, just use SOp (Local Offset) and SOp (Explicit Rotation) SOps to fix.
Triggers are only good for complex opening conditions/linked groups of doors.
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
nope! but after that picture now I wish I did.
http://www.sc2mapster.com/forums/development/data/24473-community-project-2-data-thread/?page=8#posts
That page also has the autoharvester and multi unit merge system
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