I'm trying to create an improved Refinery which doubles the harvesting rate but I can't figure out how to stop units from harvesting from the structure while it is morphing. I've tried making the morph disable abilities, but "harvesting" is a behaviour and thus isn't affected. Anyone know of a solution?
Perhaps you could create a new Harvest ability using the same marker and make the Stats: Resource Time Bonus^ + field, when added to the Harvest Time as specified in the resource unit itself, equal the morph time. From there, you would set the Stats: Resource Amount Multiplier^ + field of the Harvest ability to 0 for all resources.
The idea here is to have a dummy unit (or, if possible, the Refinery itself) "harvest" from the Refinery, occupying it and preventing other units from entering and harvesting resources until the dummy unit finishes harvesting.
I have never actually attempted something like this myself, it will be interesting to see how this works out (though, I'm sure there must be a better way).
Greetings, It should be possible to apply an effect on morph start that applies a behavior that suppresses the harvest behavior while the Refinery is Morphing. then it would just be a matter of either timing the morph and having the suppression time out then, or using a validator to test if the unit is morphing and expire when the morph is finished.
Thank you both for the responses, but I figured out a solution while attempting vailreth's solution. Morph abilities can't apply behaviours directly, but where you can set the actor/stats duration/delays of the unit morph you can also apply effects at those stages (at the start, finish, and cancel). So instead of applying a behaviour that would invalidate the resource behaviour (which, for the record, only has "requirements" and not "validators" which had me stuck for a bit) I applied an effect that removed the harvesting behaviour as soon as the morph begins. If the morph got cancelled, I would apply an effect that reapplies the old harvesting behaviour. The only issue with this is that the amount of resources in the refinery is reset, but I've already planned to not have that be a gameplay factor.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm trying to create an improved Refinery which doubles the harvesting rate but I can't figure out how to stop units from harvesting from the structure while it is morphing. I've tried making the morph disable abilities, but "harvesting" is a behaviour and thus isn't affected. Anyone know of a solution?
Perhaps you could create a new Harvest ability using the same marker and make the Stats: Resource Time Bonus^ + field, when added to the Harvest Time as specified in the resource unit itself, equal the morph time. From there, you would set the Stats: Resource Amount Multiplier^ + field of the Harvest ability to 0 for all resources.
The idea here is to have a dummy unit (or, if possible, the Refinery itself) "harvest" from the Refinery, occupying it and preventing other units from entering and harvesting resources until the dummy unit finishes harvesting.
I have never actually attempted something like this myself, it will be interesting to see how this works out (though, I'm sure there must be a better way).
Custom Campaign Initiative | Mapster Community Project: Data Wizards
Starcraft II: Unsung Rebels, a custom campaign for Starcraft II
SC2Saver, a way to create saved games via trigger
Frustrated with the editor and would like answers in real time? Join the SC2Mapster Discord!
Greetings, It should be possible to apply an effect on morph start that applies a behavior that suppresses the harvest behavior while the Refinery is Morphing. then it would just be a matter of either timing the morph and having the suppression time out then, or using a validator to test if the unit is morphing and expire when the morph is finished.
@vailreth: Go
Thank you both for the responses, but I figured out a solution while attempting vailreth's solution. Morph abilities can't apply behaviours directly, but where you can set the actor/stats duration/delays of the unit morph you can also apply effects at those stages (at the start, finish, and cancel). So instead of applying a behaviour that would invalidate the resource behaviour (which, for the record, only has "requirements" and not "validators" which had me stuck for a bit) I applied an effect that removed the harvesting behaviour as soon as the morph begins. If the morph got cancelled, I would apply an effect that reapplies the old harvesting behaviour. The only issue with this is that the amount of resources in the refinery is reset, but I've already planned to not have that be a gameplay factor.