I'm trying to make a suicide unit, like the baneling, only that when it dies it'll spawn other units as well. I've searched the forums and played around with behaviors and such, but I'm at a loss. How would I go about making it so when unit A dies, Unit B spawns?
Hmm, sounds simple enough. However, I want the unit to spawn whenever the other unit dies. So like, if you shoot it and kill it, the units still spawn. What do I add the effect to in order for that to happen?
Not sure how to go about on death events with a unit.....
My guess is theres a behavior that you would use....
Idea
Periodic behavior on unit > validator that checks to see if unit is dead > If the validator returns true with the unit dead it does an effect that spawns units
This may require using a set effect that will remove the behavior from the dead unit so that it doesnt spawn more then once.
Im not sure if the behavior will work while the unit is dead but generally units stick around for a short while while dead before they are removed from the game.
Yeah, I'm not so good with behaviors as I never touch them (Haven't really needed to), so any time I run into a problem with behaviors, I'm stuck sitting there scratching my head. Especially the validators, goddamne I hate them. I hate how it disables/removes a behavior if it's false, why can't it be if it's true? It'd be so easy to put "is not dead" thus the behavior's disabled. But I digress, I tried your way and I just can't figure it out. I make a behavior and attach it to my unit, but the other units still don't spawn, ever.
Edit: Ok I got it working so that the units will spawn, however I can't specify WHEN they're to spawn. If I put a validator such as "isdead", they wont spawn at all, even when the host unit dies. However if I use other validators, or no validators, the host unit will spawn an un-ending horde. I just don't get it, how am I suppose to specify when they spawn, if the only suitable validator makes it so they never spawn?
I did that, but still nothing. If the unit dies, nothing spawns.
Yay, sorry, forgot something. Under Combat > Death Response you have to set Chance from 0 to 1, because your effect has 0% chance to happen at the moment.
Yay, sorry, forgot something. Under Combat > Death Response you have to set Chance from 0 to 1, because your effect has 0% chance to happen at the moment.
YES! Thank you! Been struggling with this for hours, mind if I ask another question? (You seem knowledgable about behaviors so yeah)
I have a unit with a cloaking ability, I want it so that when he decloaks, it puts the cloak on a cooldown. Without the cooldown they can just drop cloak, through their nuke, and re-cloak instantly. I wanna force them to stay uncloaked for a little while because the cloak's on a cooldown. I'm pretty sure this has to be done by behaviors, but I have no idea how.
Edit: Hey, another question. I took what you showed me and made a behavior that'll spawn a zombie whenever someone's killed by a speicifc weapon, however that zombie will be on their side. How do I make it so, if my zombie kills their marine, the zombie that spawns from that marine is under my control, not theirs?
Im not quite sure how you set the controlling player on the create.... my guess is it has that as a value in the spawn unit effect.... or you need an addition effect to modify the unit
or you could just use triggers.... but i suggest you push as far as you can using data before you try triggers.
I think ive answered all your thread btw....
Your the guy that hates blizzard because they will ban ya for using halo models
The player+ field in the behavior doesn't help. All it gives me is options like caster, player origin, target. None of those help me since half of them just keep the unit as my enemies. I gave the behavior to the marine unit, not my attacking unit. Did I do it wrong? Am I suppose to give it to my attacking unit? If so, how would i go about doing that, because my method wouldn't work if my attacking unit had it. I need like 5 seperate units to spawn from a variety of units, but only if killed by a single unit type. @_@
And to Soul, I hate blizzard for a multitude of reasons :( Luckily for me, their editor isn't one of them.
Hmm, you might have to reorganize how your effect works. You'll want to put a behavior application on the weapon's effects. The behavior will be owned by you (the attacker) and will run a unit spawn effect in the target's death response. You can then use the player+ field to gain control of your zombie when the target dies.
@Colt556: GoI need like 5 seperate units to spawn from a variety of units, but only if killed by a single unit type
Are you saying that, if a marine kills something it spawns 5 out of 10 possible units under the marine players control??
If this is the case, I already have a map with something like this setup. My marine spawns between 1 and 3 burrowed zerg units out of the following possibilities when it kills any ground unit: Drone / Zergling / Baneling / Roach / Hydralisk / Queen / Ultralisk OR spawns 1 random unit from Phoenix / Corruptor / Viking if he kills an air unit. At most you can have a set call up 8 effects maximum, so I had to have 1 set(groundSpawn) -> validator is ground, and second set(airSpawn) -> validator is air, and placed the appropriate Create Unit effect in the proper Set effect, again checking for the validator ground/air. Bheavior+ > Combat > Death Response calls for a THIRD set effect, which is linked to SpawnGround and SpawnAir effects.
As per SPECIFIC WEAPON KILL:: I have my Behavior duration set to 0.0001 seconds... so basically it's an "Only that unit can force spawn effect" type buff. Let's say the behavior was 2 seconds... well I could tag a unit with my marine and then have something else kill it and still have units be spawned by another unit).
SouLCarveRR is wrong:: you don't need to use periodic effects, and even when I had my behavior duration last 30 seconds on enemies, even if I instant killed them, it did not continuously spawn units, just that 1 time.
And yes, you are supposed to give the create unit effect to the attacking unit. Unless of course you make a buff for the marine that is as big as possible that applies a permanent buff on all enemy units only(within the aura range), and that if enemy unit dies it spawns a zombie under your control. You can also specify what kind of zombie to spawn depending on enemy unit type that dies. This would require validators of course.
I've attached my map. You can take a peak!
EDIT: I was just going back over my map and actually the buff duration is ZERO and it still works.
I'll check out your map, but I mis-spoke when I said I needed 5 enemies.
Basically what I want is that, when an infection zombie kills say.. a marine, it spawns an infected marine with an assault rifle. However when that same infection zombie kills a marine armed with a shotgun, it'll spawn an infected marine with a shotgun. If I give the create unit effect to the attacker, I dunno how to specify what units it targets. Any sort of flags would be much too broad. So if I gave the create-unit effect to my infecting zombie, how would I go about specifying what unit turns into what?
P.S. If I click your map, I just get a bunch of coding gibberish o_o
Bump, I'm still at a loss for what to do. I can give the attacking unit a behavior that spawns a unit under my control, but I can't see a way to tailor that to specific units. How do I make it so if Unit A kills Unit B, it spawns Unit C, but if Unit A kills Unit D, it spawns unit E. I just don't get it.
Validators on the spawn effect would control what would spawn, depending on target.
So, lets say u have a Spawning (Set) effect, and you've got ShotgunZombieSpawn, RifleZombieSpawn, FlamerZombieSpawn effects. You would throw those 3 effects into the Spawning (Set) effect, and then throw that on each zombie. Ur Rifle effect would have a validator 'HasRifle' and 'IsDead' or whatever, that checks to see if target is a marine, ShotgunEffect would have 'HasShotgun' and 'IsDead' that checks if target is a marauder or something on the ShotgunSpawn effect, and the FlamerEffect would have HasFlamethrower' which checks to see if its a firebat, and if so, each would spawn a different unit. So on and so forth.
When u say coding gibberish... do you mean its corrupted and its got all these strange symbols or something? Or... just .... complicated?? lol.
Here's a picture, text only, of how I have my effects setup and where they are linked for my map.
You get to the above screen by pression F12 while in the editor, then click on Game Data in the left window, then you can click on the folders/+ signs to break it all down.
I assume that'll require custom validators? Well I'll go take a look, see what I can come up. Hopefully it'll do the trick.
And when I say gibberish, I mean strange symbols and whatnot. When I click the link I don't get any sort of download or anything, it just opens up a new window filled to the brim with funky coding gibberish.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm trying to make a suicide unit, like the baneling, only that when it dies it'll spawn other units as well. I've searched the forums and played around with behaviors and such, but I'm at a loss. How would I go about making it so when unit A dies, Unit B spawns?
@Colt556: Go
I made it spawn 1 zergling, added it to the Baneling - Volatile Burst (Set) Effects field and when the banelings die they spawn a zergling.
Hmm, sounds simple enough. However, I want the unit to spawn whenever the other unit dies. So like, if you shoot it and kill it, the units still spawn. What do I add the effect to in order for that to happen?
Not sure how to go about on death events with a unit.....
My guess is theres a behavior that you would use....
Idea
Periodic behavior on unit > validator that checks to see if unit is dead > If the validator returns true with the unit dead it does an effect that spawns units
This may require using a set effect that will remove the behavior from the dead unit so that it doesnt spawn more then once.
Im not sure if the behavior will work while the unit is dead but generally units stick around for a short while while dead before they are removed from the game.
Yeah, I'm not so good with behaviors as I never touch them (Haven't really needed to), so any time I run into a problem with behaviors, I'm stuck sitting there scratching my head. Especially the validators, goddamne I hate them. I hate how it disables/removes a behavior if it's false, why can't it be if it's true? It'd be so easy to put "is not dead" thus the behavior's disabled. But I digress, I tried your way and I just can't figure it out. I make a behavior and attach it to my unit, but the other units still don't spawn, ever.
Edit: Ok I got it working so that the units will spawn, however I can't specify WHEN they're to spawn. If I put a validator such as "isdead", they wont spawn at all, even when the host unit dies. However if I use other validators, or no validators, the host unit will spawn an un-ending horde. I just don't get it, how am I suppose to specify when they spawn, if the only suitable validator makes it so they never spawn?
@Colt556: Go
You can make validators that return true or that return false for either value.... Its basically an If then statement done in data....
I would suggest you try playing around with them a bit so you can wrap your head around it.
Create a Behaviour (Buff). Then go to Behaviour - Modification + > Combat > Death Response > Effect and add a Create Unit effect there.
I did that, but still nothing. If the unit dies, nothing spawns.
Yay, sorry, forgot something. Under Combat > Death Response you have to set Chance from 0 to 1, because your effect has 0% chance to happen at the moment.
YES! Thank you! Been struggling with this for hours, mind if I ask another question? (You seem knowledgable about behaviors so yeah)
I have a unit with a cloaking ability, I want it so that when he decloaks, it puts the cloak on a cooldown. Without the cooldown they can just drop cloak, through their nuke, and re-cloak instantly. I wanna force them to stay uncloaked for a little while because the cloak's on a cooldown. I'm pretty sure this has to be done by behaviors, but I have no idea how.
Edit: Hey, another question. I took what you showed me and made a behavior that'll spawn a zombie whenever someone's killed by a speicifc weapon, however that zombie will be on their side. How do I make it so, if my zombie kills their marine, the zombie that spawns from that marine is under my control, not theirs?
Im not quite sure how you set the controlling player on the create.... my guess is it has that as a value in the spawn unit effect.... or you need an addition effect to modify the unit
or you could just use triggers.... but i suggest you push as far as you can using data before you try triggers.
I think ive answered all your thread btw....
Your the guy that hates blizzard because they will ban ya for using halo models
@SouLCarveRR: Go
The player+ field determines who has control of created units in a spawn unit ability.
The player+ field in the behavior doesn't help. All it gives me is options like caster, player origin, target. None of those help me since half of them just keep the unit as my enemies. I gave the behavior to the marine unit, not my attacking unit. Did I do it wrong? Am I suppose to give it to my attacking unit? If so, how would i go about doing that, because my method wouldn't work if my attacking unit had it. I need like 5 seperate units to spawn from a variety of units, but only if killed by a single unit type. @_@
And to Soul, I hate blizzard for a multitude of reasons :( Luckily for me, their editor isn't one of them.
Bump for knowledge, the spawned units still belong to my enemy, and I can't figure out how to make them belong to me.
@Colt556: Go
Hmm, you might have to reorganize how your effect works. You'll want to put a behavior application on the weapon's effects. The behavior will be owned by you (the attacker) and will run a unit spawn effect in the target's death response. You can then use the player+ field to gain control of your zombie when the target dies.
@Colt556: Go I need like 5 seperate units to spawn from a variety of units, but only if killed by a single unit type
Are you saying that, if a marine kills something it spawns 5 out of 10 possible units under the marine players control??
If this is the case, I already have a map with something like this setup. My marine spawns between 1 and 3 burrowed zerg units out of the following possibilities when it kills any ground unit: Drone / Zergling / Baneling / Roach / Hydralisk / Queen / Ultralisk OR spawns 1 random unit from Phoenix / Corruptor / Viking if he kills an air unit. At most you can have a set call up 8 effects maximum, so I had to have 1 set(groundSpawn) -> validator is ground, and second set(airSpawn) -> validator is air, and placed the appropriate Create Unit effect in the proper Set effect, again checking for the validator ground/air. Bheavior+ > Combat > Death Response calls for a THIRD set effect, which is linked to SpawnGround and SpawnAir effects.
As per SPECIFIC WEAPON KILL:: I have my Behavior duration set to 0.0001 seconds... so basically it's an "Only that unit can force spawn effect" type buff. Let's say the behavior was 2 seconds... well I could tag a unit with my marine and then have something else kill it and still have units be spawned by another unit).
SouLCarveRR is wrong:: you don't need to use periodic effects, and even when I had my behavior duration last 30 seconds on enemies, even if I instant killed them, it did not continuously spawn units, just that 1 time.
And yes, you are supposed to give the create unit effect to the attacking unit. Unless of course you make a buff for the marine that is as big as possible that applies a permanent buff on all enemy units only(within the aura range), and that if enemy unit dies it spawns a zombie under your control. You can also specify what kind of zombie to spawn depending on enemy unit type that dies. This would require validators of course.
I've attached my map. You can take a peak!
EDIT: I was just going back over my map and actually the buff duration is ZERO and it still works.
I'll check out your map, but I mis-spoke when I said I needed 5 enemies.
Basically what I want is that, when an infection zombie kills say.. a marine, it spawns an infected marine with an assault rifle. However when that same infection zombie kills a marine armed with a shotgun, it'll spawn an infected marine with a shotgun. If I give the create unit effect to the attacker, I dunno how to specify what units it targets. Any sort of flags would be much too broad. So if I gave the create-unit effect to my infecting zombie, how would I go about specifying what unit turns into what?
P.S. If I click your map, I just get a bunch of coding gibberish o_o
Bump, I'm still at a loss for what to do. I can give the attacking unit a behavior that spawns a unit under my control, but I can't see a way to tailor that to specific units. How do I make it so if Unit A kills Unit B, it spawns Unit C, but if Unit A kills Unit D, it spawns unit E. I just don't get it.
@Colt556: Go
Validators on the spawn effect would control what would spawn, depending on target.
So, lets say u have a Spawning (Set) effect, and you've got ShotgunZombieSpawn, RifleZombieSpawn, FlamerZombieSpawn effects. You would throw those 3 effects into the Spawning (Set) effect, and then throw that on each zombie. Ur Rifle effect would have a validator 'HasRifle' and 'IsDead' or whatever, that checks to see if target is a marine, ShotgunEffect would have 'HasShotgun' and 'IsDead' that checks if target is a marauder or something on the ShotgunSpawn effect, and the FlamerEffect would have HasFlamethrower' which checks to see if its a firebat, and if so, each would spawn a different unit. So on and so forth.
When u say coding gibberish... do you mean its corrupted and its got all these strange symbols or something? Or... just .... complicated?? lol.
Here's a picture, text only, of how I have my effects setup and where they are linked for my map.
http://i56.tinypic.com/iyht8i.jpg
here's a second one, this one's actually from the editor, how it's all linked up. Hah, why didn't I do that instead of my custom pic? lol.
http://i56.tinypic.com/2r62zih.jpg
You get to the above screen by pression F12 while in the editor, then click on Game Data in the left window, then you can click on the folders/+ signs to break it all down.
I assume that'll require custom validators? Well I'll go take a look, see what I can come up. Hopefully it'll do the trick.
And when I say gibberish, I mean strange symbols and whatnot. When I click the link I don't get any sort of download or anything, it just opens up a new window filled to the brim with funky coding gibberish.