I need help with changing weapons. i have read some of the threads here, but i dont really understand what am I supposed to do..
What I am trying to achieve is, when the zealot reaches 1/3 life or lesser, his weapon automatically changes to another one if the player purchases the upgrade.
So, what I have done so far is, I have a validator which has Life < 1/3 HP. The behavior buff for the weapon change by changing the modification values. Under the mod values, weapons tab, weapons disabled, I put the psi blades there and weapons enabled, I put my new weapon there. I also did an upgrade under the upgrade tab but I am not sure of what to insert there for the upgrade - effects+. I also duplicated the psi blades weapons and edited it to use it as the other weapon
However, this doesn't work. I am unable to get the zealot to change weapons at 1/3hp or less... any ideas on where I am lacking? And, as for upgrades, how can I use the upgrade to affect the behavior? Will upgrade - effects, Behaviour set do the trick?
For a start disabling a weapon purely makes it grey an unusable. A better looking way is to make a behaviour with the initial weapon that is always on and the other behaviour disables the initial weapon behaviour. With your weapon swap at under 1/3 life put your Unit Compare Vital validator (check it works) in the Behavior - Validators (Disable) field and the requirement that you have researched the upgrade in the Requirements Field. With your upgrade just make a copy of the stimpack and rename it since all it will be used for is the requirement. With the requirement you can use a copy of the Use Stimpack requirement, just remember to swap the tech needed.
On a side note is this meant to be a permanent swap or just a tempory swap?
Thanks for the reply. I understood most of it and have already done so. Except for the first part. What do you mean by initial weapon that is always on (Isn't the initial weapon always on?) and the other behaviour disables the initial weapon behaviour? How do I get about doing that?
Edit: Crap, I just realised that the behavior isn't doing anything to the zealot. (I put a movespeed X2 just to check it). So, how do i properly attach the behavior to the zealot? I went to actors and added from event - event. from there i am not too sure what to do.
On a side note, under unit - zealot - weapons. Do I need to attach my new weapon onto the zealot? Or can I just put it in behaviours and expect the weapon to auto change for me?
This is meant to be a permanent swap. The scenario is this. Its a tug of war map, so zealots will be constantly spawning. The player doesn't control the zealots, so the skill needs to be a passive one or autocast. After the upg is purchased, zealots, including the ones that will be spawned, once they have 30% or lesser life, the weapon will swap to another weapon.
Actors are purely visuals. Under the Units data type there are the fields you need (Behavior - Behaviors - Behavior). If it is to be permanent you need to have 3 buffs. The first requires the upgrade and the 1/3 life and it then periodically applies the weapon buff which disables the other weapon buff resulting in a permanent change. You do not need to put the weapons on the actual units, having them in the buffs is enough.
This was what i was lacking all along!!!! Oh well, I guess its more memoriable to learn stuff the hard way. Thanks a lot for your tutorial and your help. Btw, if you dont mind, can i use your phrase mine for an attack lol
Considering that is already ingame, it is an ability of Zeratul's Void Seeker ship. All I did was make a weapons swap that uses effect trees already ingame.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I need help with changing weapons. i have read some of the threads here, but i dont really understand what am I supposed to do..
What I am trying to achieve is, when the zealot reaches 1/3 life or lesser, his weapon automatically changes to another one if the player purchases the upgrade.
So, what I have done so far is, I have a validator which has Life < 1/3 HP. The behavior buff for the weapon change by changing the modification values. Under the mod values, weapons tab, weapons disabled, I put the psi blades there and weapons enabled, I put my new weapon there. I also did an upgrade under the upgrade tab but I am not sure of what to insert there for the upgrade - effects+. I also duplicated the psi blades weapons and edited it to use it as the other weapon
However, this doesn't work. I am unable to get the zealot to change weapons at 1/3hp or less... any ideas on where I am lacking? And, as for upgrades, how can I use the upgrade to affect the behavior? Will upgrade - effects, Behaviour set do the trick?
For a start disabling a weapon purely makes it grey an unusable. A better looking way is to make a behaviour with the initial weapon that is always on and the other behaviour disables the initial weapon behaviour. With your weapon swap at under 1/3 life put your Unit Compare Vital validator (check it works) in the Behavior - Validators (Disable) field and the requirement that you have researched the upgrade in the Requirements Field. With your upgrade just make a copy of the stimpack and rename it since all it will be used for is the requirement. With the requirement you can use a copy of the Use Stimpack requirement, just remember to swap the tech needed.
On a side note is this meant to be a permanent swap or just a tempory swap?
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
Thanks for the reply. I understood most of it and have already done so. Except for the first part. What do you mean by initial weapon that is always on (Isn't the initial weapon always on?) and the other behaviour disables the initial weapon behaviour? How do I get about doing that?
Edit: Crap, I just realised that the behavior isn't doing anything to the zealot. (I put a movespeed X2 just to check it). So, how do i properly attach the behavior to the zealot? I went to actors and added from event - event. from there i am not too sure what to do.
On a side note, under unit - zealot - weapons. Do I need to attach my new weapon onto the zealot? Or can I just put it in behaviours and expect the weapon to auto change for me?
This is meant to be a permanent swap. The scenario is this. Its a tug of war map, so zealots will be constantly spawning. The player doesn't control the zealots, so the skill needs to be a passive one or autocast. After the upg is purchased, zealots, including the ones that will be spawned, once they have 30% or lesser life, the weapon will swap to another weapon.
Thanks a lot.
Actors are purely visuals. Under the Units data type there are the fields you need (Behavior - Behaviors - Behavior). If it is to be permanent you need to have 3 buffs. The first requires the upgrade and the 1/3 life and it then periodically applies the weapon buff which disables the other weapon buff resulting in a permanent change. You do not need to put the weapons on the actual units, having them in the buffs is enough.
Here is a demo map that might help
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
Behavior - Behaviors - Behavior
This was what i was lacking all along!!!! Oh well, I guess its more memoriable to learn stuff the hard way. Thanks a lot for your tutorial and your help. Btw, if you dont mind, can i use your phrase mine for an attack lol
Considering that is already ingame, it is an ability of Zeratul's Void Seeker ship. All I did was make a weapons swap that uses effect trees already ingame.
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