Unit A creates turrets with an ability. If more than 5 turrets are alive at once coming from this unit, one turret should die before the new turret is created. [Multiple unit A (creator of turrets) can exist at a time.]
I've tried accomplishing this bookkeeping effect with a stacked behavior on the creator indicating count, but it hasn't worked out so far. Anyone have any suggestions on getting the max 5 effect I'm looking for?
I was trying to avoid a triggery solution since this will be a huge map with tons of this (and other) units on the map at once.. I wanted 2 reduce the laag. Will go triggers if there's no data solution to my prob.
I dont know if its possible just an idea i had, could you use charges on an ability to make the turrets cost 1 charge, then use a behavior which adds the charge back when the turret dies?
Ty for the suggestion, but it wouldn't fit the effect I'm going for. I want the player to be able to refresh turrets w/e the player feels like it without them dying on their own.
I was trying to avoid a triggery solution since this will be a huge map with tons of this (and other) units on the map at once.. I wanted 2 reduce the laag. Will go triggers if there's no data solution to my prob.
Tbh, I don't think, using triggers here would produce any noticeable lag.
However, it should be possible in data as well: Can players have multiple builders of the same kind? If not, you could add a behavior to all turrets, when a new one is constructed and kill all turrets with 5+ stacks.
Or you perform a search, which uses a target sort based on the timed life behavior duration (if you happen to have one), and kill the turret with the least amount of time left.
Can players have multiple builders of the same kind?
They can. Any player can have any number of this builder, which is where my problem lies D:
@Hobrow: I will have to check your map when I get back home *crosses fingers*
@Keuken (again lol): I've used a similar search on some uncommandable units for a slave effect, but that wouldn't work in this situation since players can have any number of builder or turrets on the field at once and im trying to limit to X per builder =\
I figured it would be simple to have behavior stack count on the builder to show how many turrets he currently has.. but that was a fail... if all else fails, i can go the triggery route. I try to push data when I can :)
Is it 100% required, that each builder has his own "stack" of turrets? Or would something more generalized be okay as well? Something like 5 turrets per builder, but a shared stack, so if 1 of 2 bulders builds an 11th turret, the oldest one gets destroyed, regardless who actually built it?
Is it 100% required, that each builder has his own "stack" of turrets? Or would something more generalized be okay as well? Something like 5 turrets per builder, but a shared stack, so if 1 of 2 bulders builds an 11th turret, the oldest one gets destroyed, regardless who actually built it?
That could actually b viable.. How would u suggwst serting a system like that up via data?
That could actually b viable.. How would u suggwst serting a system like that up via data?
I am not sure yet... I have a feeling, it might work that way ;)
You can check for all turrets of a specific type and for all workers via requirements (if you compare workers*5<=turrets)
You can check a behavior duration, which would equal the life time (if you actually need a timed life behavior for this and don't want it, just make it hidden and 9999 seconds or something)
You can search all turrets of a kind and sort them by this duration, and eventually kill the oldest one
If I did not miss anything, this should cover everything we need.
Think I figured out a pure Data solution that might work. Create a Search effect on the ability with an area of 500 (maximum map range). Create a Set effect for the Search effect. Have 2 effects within the set. 1. Apply behavior that applies a dummy behavior that stacks up to 4 times. 2. A damage effect with "Kill" checked in the Flags.
Here's the important part. On either the search or the set or 2 individual effects, create a validator that checks the type of unit. I don't have the editor in front of me, but I think you can do it several ways, like either checking the actual unit type or maybe some kind of unique attribute that only it has in the entire game. But stick that validator in somewhere so the search does not choose any other type of unit. In the search filters, check only Player, and you could perhaps require the specific attribute your unit has here, rather than making the validator.
Next you would make a second validator and put it on the Damage Effect that kills the unit. Make it a behavior count validator, and make it check that the target unit of the search has (4 =< stack count of dummy behavior).
Sorry I don't have all the specifics in here, but this method should work.
Unit A creates turrets with an ability. If more than 5 turrets are alive at once coming from this unit, one turret should die before the new turret is created. [Multiple unit A (creator of turrets) can exist at a time.]
I've tried accomplishing this bookkeeping effect with a stacked behavior on the creator indicating count, but it hasn't worked out so far. Anyone have any suggestions on getting the max 5 effect I'm looking for?
Its actuallly quite simple, just run a condition that gets how many units of type there is, and if there is > 5 Turrets, kill Triggering Unit.
@Pshyched: Go
You can set "at most Any Amount" to "at most 6." There's no need to check all units in the entire map.
you just set it to triggering player, the player who created it..
I guess I havn't explained thoroughly enough. I like pictures, so I'll draw a picture:
So I don't mean 5 turrets in the entire map. I mean 5 turrets made by that specific unit.
O.o
Okay, why not add that unit into a Unit Group?...
I was trying to avoid a triggery solution since this will be a huge map with tons of this (and other) units on the map at once.. I wanted 2 reduce the laag. Will go triggers if there's no data solution to my prob.
I dont know if its possible just an idea i had, could you use charges on an ability to make the turrets cost 1 charge, then use a behavior which adds the charge back when the turret dies?
Ty for the suggestion, but it wouldn't fit the effect I'm going for. I want the player to be able to refresh turrets w/e the player feels like it without them dying on their own.
The attached map file might be what youre looking for.
However I limited the turret count to 3. But it's expandable. If you have any questions how I made it, feel free to ask.
Edit:
Things to note:
Heh ;)
Seems to have some issues
Tbh, I don't think, using triggers here would produce any noticeable lag.
However, it should be possible in data as well: Can players have multiple builders of the same kind? If not, you could add a behavior to all turrets, when a new one is constructed and kill all turrets with 5+ stacks.
Or you perform a search, which uses a target sort based on the timed life behavior duration (if you happen to have one), and kill the turret with the least amount of time left.
Yeah I tested it for the first 7 turrets or so and it worked fine, but the longer I was placing turrets the more bugged...
They can. Any player can have any number of this builder, which is where my problem lies D:
@Hobrow: I will have to check your map when I get back home *crosses fingers*
@Keuken (again lol): I've used a similar search on some uncommandable units for a slave effect, but that wouldn't work in this situation since players can have any number of builder or turrets on the field at once and im trying to limit to X per builder =\
I figured it would be simple to have behavior stack count on the builder to show how many turrets he currently has.. but that was a fail... if all else fails, i can go the triggery route. I try to push data when I can :)
@iE4TM4PS: Go
Is it 100% required, that each builder has his own "stack" of turrets? Or would something more generalized be okay as well? Something like 5 turrets per builder, but a shared stack, so if 1 of 2 bulders builds an 11th turret, the oldest one gets destroyed, regardless who actually built it?
That could actually b viable.. How would u suggwst serting a system like that up via data?
I am not sure yet... I have a feeling, it might work that way ;)
If I did not miss anything, this should cover everything we need.
Think I figured out a pure Data solution that might work. Create a Search effect on the ability with an area of 500 (maximum map range). Create a Set effect for the Search effect. Have 2 effects within the set. 1. Apply behavior that applies a dummy behavior that stacks up to 4 times. 2. A damage effect with "Kill" checked in the Flags.
Here's the important part. On either the search or the set or 2 individual effects, create a validator that checks the type of unit. I don't have the editor in front of me, but I think you can do it several ways, like either checking the actual unit type or maybe some kind of unique attribute that only it has in the entire game. But stick that validator in somewhere so the search does not choose any other type of unit. In the search filters, check only Player, and you could perhaps require the specific attribute your unit has here, rather than making the validator.
Next you would make a second validator and put it on the Damage Effect that kills the unit. Make it a behavior count validator, and make it check that the target unit of the search has (4 =< stack count of dummy behavior).
Sorry I don't have all the specifics in here, but this method should work.
@Monictor: Go
If the turrets can die by enemy fire or expiration time, the method fails, though.
I have a tricky ugly solution.
The caster would apply a buff to each new unit, and displace them as units grow. Here is a simple example, with 3 units:
Caster summons unit. Unit1 gets Buff1.
Caster summons another unit. Unit1 gets Buff1 removed and gets Buff2 applied, while Unit2 gets Buff1 applied. All these applied by caster.
Caster summons yet nother unit. Unit1 gets Buff2 removed and Buff3 applied. Unit 2 ggets Buff1 removed and Buff2 applied. Unit3 gets Buff1 applied.
Caster summons yet another unit! Unit1 gets Buff3 removed and InstaDeathBuff applied. Unit 2 ggets Buff2 removed and Buff3 applied. Unit3 gets Buff1 removed and Buff2 applied. Unit4 Gets Buff1 applied.
See what i did there. A bit hacky, but should have them bound to casters.
Go play Antioch Chronicles Remastered!
Also, coming soon, Antioch Episode 3: Thoughts in Chaos!
Dont like mapster's ugly white? Try Mapster's Classic Skin!