I have a starport that I want to train an air unit every (for example) 20 seconds. Can this be done through the data editor rather than triggers? I'm not too familiar with the data editor, I can do basic things but that's about it. If you could explain in detail or point me to a tutorial or another thread that explains it in detail that would be awesome.
The Starport should actually train the unit, not just have a unit created at it's location - as im using the "unit training is completed" trigger for another part of the map triggers. UNLESS of course, I can issue an order to the air unit that's created via the data editor too.
Sure, there are issue order effects you can use for that. You can either look, if there is any field for the training ability, which lets you execute an effect, whenever a unit is produced (then you would need to figure out, which unit to target to get the starport), or you could just use a behavior or an autocast ability, which periodically issues the order to the starport.
Issuing an order to the constructed unit is possible as well, but you cannot select a specific target for this order. So you would need some workaround like marking the target point with a dummy unit or searching for enemy units on the map or something.
What you say makes sense on paper, but I'm having a really hard time figuring out how to accomplish what you're saying while I'm staring at the data editor fields for anything. :/
Essentially, the ideal situation would be that I can just add a custom behavior to any unit in the data editor, and if that unit dies in-game, it's recreated but belonging to the killing player.
I'm really new at using effects and behaviors, so i really need a link to a good tutorial, or if you have enough patience explain it in realllly good detail. Thanks :)
Or have a buff with a damage response that changes ownership if the damage would be fatal and ehals it in the same step.
Ok base your basic on death buff on the Valerian02a - Hero Death Prevention buff as that stops the fatal shot killing the thing and also applies an effect. You will need to use a Set effect to use the Zerg General - Post Morph (Healing Effect) and a Modify Unit effect. In the Modify Unit effect use the Owner modification flag and set the impact unit to the caster and the transfer unit value to the target.
Okay so now I have a behavior that was based on Valerian02a - Hero Death Prevention and I also have the 2 different effects set as listed above. Do I link the effects to the behavior in a field somewhere in the behavior? Or on the structure?
I'm assuming it's in the Effect - Initial and Effect - Final fields? That's my best guess anyways from looking through it...
Nope, those fields didn't work. hehe. I'm assuming that's kind of the right idea though? Link the two effects to the behavior, and then add the behavior to the unit?
You are after the Combat - Damage Response - Handled field. The Set effect is what can be used to have several effects branching from a single effect or behaviour. In short your damage response effect when damage is fatal will use the set effect which will then use both the other two effects at the same instance.
Then yes, you just give the behaviour to the unit.
I created a new behavior called Change Owner On Death, that's based on Valerion02a - Hero Death Prevention.
I created a new effect called Heal And Owner Swap, with a type set as Set, and based on Default Effect.
I created another new effect called Owner Swap, with a type set as Modify Unit, and based on Default Effect.
I then go into the Heal And Owner Swap (set effect) effect and add Owner Swap and Zerg General - Post Morph (Healing Effect) to the Effects: Effect field.
I then switch over to the Owner Swap (modify unit) effect and set the Effect: Modification Flags to Owner, then I set the Target: Impact Unit - Value field to Caster... and then the Unit: Transfer Unit - Value to Target.
Then, in the Change Owner On Death behavior, I change the Combat: Damage Response - Handled field to Heal And Owner Swap.
Then, I go into the Starport unit fields, and add the behavior Change Owner On Death to it.
I then make 4 BC's for myself, and 4 starports for player 2. When I test the document, I can simply attack them indefinitly, the starport HP never drops below 5, and they always remain player 2's.
So somewhere it seems that I need to change a field that perhaps actually lets the unit receive a fatal blow? That's my guess. Any ideas which field where?
Simple test method for your behaviour, get it to have the psistorm persistent effect as the effect handled. Sure you set the damage response chance to 1?
Edit: Ok seems I was not totally correct and that the Modify Unit effect seems to be bugged in that it can only tranfer ownership to the caster. Simple alternative do like neural parasite with a buff. Also you will need a modified version of the zerg post morph heal that targets the caster. See the answer map supplied.
Hmm the sample map doesn't work quite yet, as once the zergling dies, it does change ownership, so that part works just fine, but the marine that I had ordered to attack it continues to attack it even after it's converted to my ownership. Perhaps there needs to be a temporary invincible buff on it or something to detach all attackers? Man, even after going through all of this with you step by step, I still don't even know where to begin. I look through all of the buff entries in the wiki that's pretty much the exact same information as the hover text in the data editor fields. It really doesn't help those of us who aren't used to it. Any suggestions on what to do about the invincable thing?
If you get the zergling to be converted to hostile from your ownership you find the hostile marine stops shooting. Only if you order it to attack the unit via the attack ability does it continue.
Just apply a second buff with a short (fraction of a second) duration that applies the invulnerable state flag. All you need to do is add the Apply Behavior effect to your set.
Also to stop exploiting the heal when the unit hits low hp you might want to add a validator of the Unit Filters type to ensure that the target of the set effect is not a friendly unit.
I have a starport that I want to train an air unit every (for example) 20 seconds. Can this be done through the data editor rather than triggers? I'm not too familiar with the data editor, I can do basic things but that's about it. If you could explain in detail or point me to a tutorial or another thread that explains it in detail that would be awesome.
The Starport should actually train the unit, not just have a unit created at it's location - as im using the "unit training is completed" trigger for another part of the map triggers. UNLESS of course, I can issue an order to the air unit that's created via the data editor too.
Anyways, thanks for any help!
Sure, there are issue order effects you can use for that. You can either look, if there is any field for the training ability, which lets you execute an effect, whenever a unit is produced (then you would need to figure out, which unit to target to get the starport), or you could just use a behavior or an autocast ability, which periodically issues the order to the starport.
Issuing an order to the constructed unit is possible as well, but you cannot select a specific target for this order. So you would need some workaround like marking the target point with a dummy unit or searching for enemy units on the map or something.
@Kueken531: Go
What you say makes sense on paper, but I'm having a really hard time figuring out how to accomplish what you're saying while I'm staring at the data editor fields for anything. :/
Essentially, the ideal situation would be that I can just add a custom behavior to any unit in the data editor, and if that unit dies in-game, it's recreated but belonging to the killing player.
I'm really new at using effects and behaviors, so i really need a link to a good tutorial, or if you have enough patience explain it in realllly good detail. Thanks :)
Or have a buff with a damage response that changes ownership if the damage would be fatal and ehals it in the same step.
Ok base your basic on death buff on the Valerian02a - Hero Death Prevention buff as that stops the fatal shot killing the thing and also applies an effect. You will need to use a Set effect to use the Zerg General - Post Morph (Healing Effect) and a Modify Unit effect. In the Modify Unit effect use the Owner modification flag and set the impact unit to the caster and the transfer unit value to the target.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Okay so now I have a behavior that was based on Valerian02a - Hero Death Prevention and I also have the 2 different effects set as listed above. Do I link the effects to the behavior in a field somewhere in the behavior? Or on the structure?
I'm assuming it's in the Effect - Initial and Effect - Final fields? That's my best guess anyways from looking through it...
@playpong: Go
Nope, those fields didn't work. hehe. I'm assuming that's kind of the right idea though? Link the two effects to the behavior, and then add the behavior to the unit?
You are after the Combat - Damage Response - Handled field. The Set effect is what can be used to have several effects branching from a single effect or behaviour. In short your damage response effect when damage is fatal will use the set effect which will then use both the other two effects at the same instance.
Then yes, you just give the behaviour to the unit.
Please there is a fully detailed page about buffs on the wiki, please read it. http://www.sc2mapster.com/wiki/galaxy/data/behaviors/buff/
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
Okay, so this is what I'm testing now then...
I created a new behavior called Change Owner On Death, that's based on Valerion02a - Hero Death Prevention.
I created a new effect called Heal And Owner Swap, with a type set as Set, and based on Default Effect.
I created another new effect called Owner Swap, with a type set as Modify Unit, and based on Default Effect.
I then go into the Heal And Owner Swap (set effect) effect and add Owner Swap and Zerg General - Post Morph (Healing Effect) to the Effects: Effect field.
I then switch over to the Owner Swap (modify unit) effect and set the Effect: Modification Flags to Owner, then I set the Target: Impact Unit - Value field to Caster... and then the Unit: Transfer Unit - Value to Target.
Then, in the Change Owner On Death behavior, I change the Combat: Damage Response - Handled field to Heal And Owner Swap.
Then, I go into the Starport unit fields, and add the behavior Change Owner On Death to it.
I then make 4 BC's for myself, and 4 starports for player 2. When I test the document, I can simply attack them indefinitly, the starport HP never drops below 5, and they always remain player 2's.
So somewhere it seems that I need to change a field that perhaps actually lets the unit receive a fatal blow? That's my guess. Any ideas which field where?
Simple test method for your behaviour, get it to have the psistorm persistent effect as the effect handled. Sure you set the damage response chance to 1?
Edit: Ok seems I was not totally correct and that the Modify Unit effect seems to be bugged in that it can only tranfer ownership to the caster. Simple alternative do like neural parasite with a buff. Also you will need a modified version of the zerg post morph heal that targets the caster. See the answer map supplied.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
Hmm the sample map doesn't work quite yet, as once the zergling dies, it does change ownership, so that part works just fine, but the marine that I had ordered to attack it continues to attack it even after it's converted to my ownership. Perhaps there needs to be a temporary invincible buff on it or something to detach all attackers? Man, even after going through all of this with you step by step, I still don't even know where to begin. I look through all of the buff entries in the wiki that's pretty much the exact same information as the hover text in the data editor fields. It really doesn't help those of us who aren't used to it. Any suggestions on what to do about the invincable thing?
If you get the zergling to be converted to hostile from your ownership you find the hostile marine stops shooting. Only if you order it to attack the unit via the attack ability does it continue.
Just apply a second buff with a short (fraction of a second) duration that applies the invulnerable state flag. All you need to do is add the Apply Behavior effect to your set.
Also to stop exploiting the heal when the unit hits low hp you might want to add a validator of the Unit Filters type to ensure that the target of the set effect is not a friendly unit.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg