Hey, I'm looking to make an ability that would remove the unit in question and spawn a different one in his place. I can't figure the ability/effect/whatever that I need for this AT ALL. Hell, even if I can have an ability trigger a variable I could just do this using triggers.
My issue is that I want a button on the unit quick bar that can be clicked, will spend 1 vespene gas, then remove that unit and place a new one.
I've looked at tutorials for the ability editor, but it confuses the crap outta me still. All help appreciated!
Is it like an upgrade? Morph into another unit? Should the unit keep the same abilities and stats, so it would only be the actor that should get changed? Or should a completely new unit appear, another actor, other skills/stats?
Look at something like the zergling-baneling morph if you need a starting place. That has an intermediate step though (the baneling cocoon). I really don't know, but it sounds like that is roughly what you are trying to do.
P.S. It is handled under that actor events I believe (the events field in the unit's actor).
Make an ability of type Effect-Target. Create an effect of the type Set, and make this set the effect of the ability. Set the target type as Unit. Then, put 2 effects within the set. One would be a Damage effect. Within the "Flags," check "Kill." The second would be a "Create Unit" effect, and simply put whatever unit you want to create in there, with the target as "Target Unit/Point."
I think he'd want an Effect-Instant, if I read the OP right, but that would work. (I think he wanted it to target the caster.)
@OP: You could also try a Train ability with Kill On Complete and Select checked and a build time of 0, I think. The advantage if this is that the player doesn't lose selection. (If you use a train ability, you don't need to edit the actor, afaik.)
I literally want one unit fully removed (say... a civ) and a new unit put in it's place (kill civ, spawn tank at civs location). 2 separate units! =P
And I tried looking at the bane morph, but that cocoon stage confused me.
Monictor and biophysist - thanks for the tips! I will try them out when I get home.
Any other help or ideas appreciated still, as they help me learn wtf I'm doing here.
@aczchef: Go
I've done so much hand coding in other languages that I fine triggers to be much more 'at home' for me. lol
OK, so I thought I had it all correct, the button is there- but when I click the button in game it asks me to select a target and I can't select anyone!
I've tried to set it up so it just targets the casting unit, but that doesn't seem to be working. I can't even self select the unit as it refuses to accept any target.
Here are some screens of my commands:
The Unit button, the Ability, the Set, the Kill effect and the spawn effect.
This was using Monictor's method. File names tell what each screen is.
(sorry for being such a newb, but I'm finding this to be freakin' hard for some reason. Maybe I'm just stupid? lol)
Wait! I got it working using Biophysics method instead! Thanks!
Just one last question - where do you edit the supply cost of a unit? I can edit the minerals and crap, but not how much suply my 'marine' takes. (I want 0)
Hey, I'm looking to make an ability that would remove the unit in question and spawn a different one in his place. I can't figure the ability/effect/whatever that I need for this AT ALL. Hell, even if I can have an ability trigger a variable I could just do this using triggers.
My issue is that I want a button on the unit quick bar that can be clicked, will spend 1 vespene gas, then remove that unit and place a new one. I've looked at tutorials for the ability editor, but it confuses the crap outta me still. All help appreciated!
@hobolyra: Go
Is it like an upgrade? Morph into another unit? Should the unit keep the same abilities and stats, so it would only be the actor that should get changed? Or should a completely new unit appear, another actor, other skills/stats?
Look at something like the zergling-baneling morph if you need a starting place. That has an intermediate step though (the baneling cocoon). I really don't know, but it sounds like that is roughly what you are trying to do.
P.S. It is handled under that actor events I believe (the events field in the unit's actor).
this isn't related but i found data easier then triggers
@hobolyra: Go
Make an ability of type Effect-Target. Create an effect of the type Set, and make this set the effect of the ability. Set the target type as Unit. Then, put 2 effects within the set. One would be a Damage effect. Within the "Flags," check "Kill." The second would be a "Create Unit" effect, and simply put whatever unit you want to create in there, with the target as "Target Unit/Point."
I think he'd want an Effect-Instant, if I read the OP right, but that would work. (I think he wanted it to target the caster.)
@OP: You could also try a Train ability with Kill On Complete and Select checked and a build time of 0, I think. The advantage if this is that the player doesn't lose selection. (If you use a train ability, you don't need to edit the actor, afaik.)
Could we have some details as to what the different units are like? If you purely want them to change looks you can use a Model Swap actor event.
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
I literally want one unit fully removed (say... a civ) and a new unit put in it's place (kill civ, spawn tank at civs location). 2 separate units! =P And I tried looking at the bane morph, but that cocoon stage confused me.
Monictor and biophysist - thanks for the tips! I will try them out when I get home. Any other help or ideas appreciated still, as they help me learn wtf I'm doing here.
@aczchef: Go I've done so much hand coding in other languages that I fine triggers to be much more 'at home' for me. lol
Then look at the viking/siege tank morph since that is what you want
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
@aczchef: Go
OK, so I thought I had it all correct, the button is there- but when I click the button in game it asks me to select a target and I can't select anyone! I've tried to set it up so it just targets the casting unit, but that doesn't seem to be working. I can't even self select the unit as it refuses to accept any target.
Here are some screens of my commands:
The Unit button, the Ability, the Set, the Kill effect and the spawn effect. This was using Monictor's method. File names tell what each screen is.
(sorry for being such a newb, but I'm finding this to be freakin' hard for some reason. Maybe I'm just stupid? lol)
Wait! I got it working using Biophysics method instead! Thanks!
Just one last question - where do you edit the supply cost of a unit? I can edit the minerals and crap, but not how much suply my 'marine' takes. (I want 0)
Try the nice field called Stats - Supplies under the Units data type.
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