I need a system that allows a team of players(2 players) to take control of a unit with a 30 second delay and this unit that would be taken over would give passive income to the team that owns this unit. How do i do this? Heres some details that might be needed:
- There are 2 teams of 2 players
- The unit that would be taken control needs to be a structure that gives income two both players on the team without needing shared income.
- The enemy team needs to be able to control this unit so that they can take it over as well
- While being taken, the enemy team should be able to cancel it if they approach the structure without enemies being within a certain radius
Im trying to do this myself but it very complex for me and will take me forever without assistance, i know some of this will probably have be in triggers but im sure most of the details will be in data, so i posted the thread in the Data category.
Giving resources to the other player in the team probably has to be done via triggers, but might be possible if the teams don't contain additional human players.
For changing control, look at the Infestor's Neural Parasite if players should have to manually target the structure to take control, or the Xel'Naga Watchtower if it should passively switch allegiance to whoever is nearby.
Adding delays and allowing re-capture is the easy bit, play around with Buff Behaviors/Persistent Effects and Target Filters.
Thanks for the tips, As for your first paragraph, there are two teams of two players, so i don't know if that will make it difficult. As for the income i want two HUMAN players to receive equal income when a "point" is taken over. I would also like to have the option to build a structure on TOP of the point to boost income from that point.
Just check out the Ownership Changer demo map under my data assets. As for the uncome, as stated in the above post triggers is best for multiple players.
Contribute to the wiki (Wiki button at top of page)
Considered easy altering of the unit textures?
For my public assets look here!
If you really want to give resources via data, I think a long-range search set to ally units only should be able to run a Modify Player effect for the owner of the search target, giving them resources. This certainly won't work if there are allied units on the map whose controller shouldn't receive income but whose resources still matter (cheating AI bases, MOBA minions and the like generally have no use for resources so those are OK)
For building on top of the structure check the Vespene Refineries, specifically the Behavior: Built On+ field. There are also tons of workarounds if the "upgrade" doesn't have to function like an independent structure.
I was thinking about having a computer ally that maybe owns all the points of its team, and them the computer recieves the resources and then they get split between the two human players, as how a leaving player gives all resources to his allies and all income gained after it split, but i doubt this could be done with computer players.
I already have a structure that gets built on top of a point, its the increased income that im needing to learn about.
I've been busy the past few days but im ready to edit my map again so ill see what i can do.
An upgrade that just alters a Modify Unit behaviour would work but if you are using triggers you just need to count the number of upgrades.
That would work for increasing income?
Thanks for the neural parasite idea! It appears to be working perfectly after some modifications, i used a command trigger so i can test recontrolling. Now its just the income gained when you take a point, and havinga income boosting structure.
I plan on having 3 different resources, and points around the map will provide income for specific resources. Will i need to have 3 different unit types that are just the same but are used to show the difference between the 3 resources? Also, will having a computer player that gets the income but then gets split between the two players on the computer's team work?
If you give resources via data you have multiple buff stacks for dynamic/temporary increases and upgrades for permanent ones. If you're using triggers you can literally do "Increase PlayerResource by (stackable counting object)*x", and you can count units on the field, upgrades, buff stacks, or even a combination of those.
For the data-only road you seem to have misunderstood me, it works only if there isn't any AI ally whose resources matter. The idea was to run a Search effect that only affects allies to run a Modify Player effect on one of their units, as Data doesn't support direct player references. (Modify Player=give resources)
The game actually supports 4 resource types (+supply), 3 of which have decent icons by default. You must enable their display under the Race data type, but all 4 can be used equally, and given seperately via both Modify Player effects and triggers.
I understand how to change resource icons,names, and display. What a terrible experience it was to find out how but i did it.
I dont HAVE to use a computer ally for income or anything really, just a neutral computer to have the point by default, and then 4 human players for the game. I would greatly prefer to go all data, so ill look into that first.
So could you give me extra detail in how i would do this in the data? So far i got: use the "search area" effect that look for allies and i assume self, so both players would obtain resources. Am i going to use a "modify player" behavior for the result, which would give resources?
The simplest chain should be this:
If that doesn't work try a Set effect containing a Modify Player effect for Caster and a Search for Ally only with max 1 target (and Caster not added to Include+)
Note the Search range has to be very high to guarantee it will find an allied unit.
Using the Caster reference might fail if the neutral structure has the behavior by default, as it might still recognize its original owner as the "casting player"
Okay ill see what i can do.
EDIT: Well by default the unit DOES have the behavior, since there are multiple resources and i only want one point to provide one resource. I tried the first 3 steps and the behavior does not give me resources, so ill try the set effect now but im thinking the caster reference might still block it.
Yes! the set version works(for me). I'll have to test with another human player to see if the ally of the caster obtains the income as well, because the search could be the issue. All that is left now is the Income boost from building a structure on top on the point(while also preventing enemy capture while the structure is alive).
Ive created the boosting structure and it gives proper resources, i needed to add two validators for the income behavior:
The income behavior is removed if the validator isnt true. The validator checks for what "point" it is built on and keeps one of 3 behaviors(THE 3 RESOURCES)
Everything in this thread is resolved, thank you Photoloss and DrSuperEvil for helping me.
You must login to post a comment. Don't have an account? Register to get one!