I've created some abilities that cost a resource that is supposed to be shared between the players. The current system im using is based on triggers but its very buggy and doesnt always subtract the cost of the ability away from each player. So i want to know if theres a way to have a ability give a resource to the caster and the allies of that caster, as well as take resources away when a ability requires that shared resource.
Im not quite sure what you mean about using triggers to refresh the visual. I'd still prefer to have a 100% data only system for this if its possible though. Honestly the resource spending doesnt HAVE to be for one team, since all human players are on a single team and the other ai's dont use this resource.
you can't share one resource only, either all or nothing. the trigger wouldn't do any logic and will just make it look like it is a resource. data just uses global charges for your ability which might be set with data or triggers.
but i also have the feeling the bug you described in your first post still persists even with a data solution. you should check the flag "defer cooldown" and there was another important flag to prevent fail casts or multiple instant casts as i call them.
I think my situation may be more complicated than i thought. The abilities that need this shared resource are from a shared unit that you gain control of by clicking it(via triggers), and a bunker that you control through a ability that is essentially a skeleton of the Infestor's Neural Parasite. Im also curious if you add and subtract resources in the same trigger at the same player with no wait timer, if it wont finish one of the operations because its cancelled out by the add/subtract action. Here's a layout of the system:
For the Shared Building:
- Shared building is selected, the player that selects it gains ownership.
- Owner of shared building uses one of it's abilities.
- - Ability costs 60 of the shared resource.
- - Since the ability costs 60, the casting player loses 60 on the spot.
- A trigger fires when that ability is used.
- - That trigger removes 60 of that shared resource from every player(since using the player group containing all human players seemed to not work).
- - 60 of that resource is given back to the owner of the casting unit.
Should that add 60 to casting player be before the remove 60, then have there be a wait timer in between? Im not very good at triggers, i prefer everything in data but this doesn't seem possible in data.
I've created some abilities that cost a resource that is supposed to be shared between the players. The current system im using is based on triggers but its very buggy and doesnt always subtract the cost of the ability away from each player. So i want to know if theres a way to have a ability give a resource to the caster and the allies of that caster, as well as take resources away when a ability requires that shared resource.
have for each team global charges for each ability and use triggers to refresh just the visual (set the resource to the number of charges left)
Im not quite sure what you mean about using triggers to refresh the visual. I'd still prefer to have a 100% data only system for this if its possible though. Honestly the resource spending doesnt HAVE to be for one team, since all human players are on a single team and the other ai's dont use this resource.
you can't share one resource only, either all or nothing. the trigger wouldn't do any logic and will just make it look like it is a resource. data just uses global charges for your ability which might be set with data or triggers.
but i also have the feeling the bug you described in your first post still persists even with a data solution. you should check the flag "defer cooldown" and there was another important flag to prevent fail casts or multiple instant casts as i call them.
I think my situation may be more complicated than i thought. The abilities that need this shared resource are from a shared unit that you gain control of by clicking it(via triggers), and a bunker that you control through a ability that is essentially a skeleton of the Infestor's Neural Parasite. Im also curious if you add and subtract resources in the same trigger at the same player with no wait timer, if it wont finish one of the operations because its cancelled out by the add/subtract action. Here's a layout of the system:
For the Shared Building:
- Shared building is selected, the player that selects it gains ownership.
- Owner of shared building uses one of it's abilities.
- - Ability costs 60 of the shared resource.
- - Since the ability costs 60, the casting player loses 60 on the spot.
- A trigger fires when that ability is used.
- - That trigger removes 60 of that shared resource from every player(since using the player group containing all human players seemed to not work).
- - 60 of that resource is given back to the owner of the casting unit.
Should that add 60 to casting player be before the remove 60, then have there be a wait timer in between? Im not very good at triggers, i prefer everything in data but this doesn't seem possible in data.