Staredit Network > Forums > SC2 Assistance > Topic: Swapping weapons as part of a buff?
Swapping weapons as part of a buff?
Sep 9 2010, 5:45 pm
By: Anogio  

Sep 9 2010, 5:45 pm Anogio Post #1



I am trying to create an ability that will swap from the primary weapon to a predefined "buff" weapon for the duration of the buff, allowing (via the weapon behaviour/effect) to hit multiple targets in a cone in front of the unit.

I have succeded in creating the weapon, and creating the ability, but getting the ability to swap the weapon is proving troublesome.

Any help would be greatly appreciated.

Additionally: I would like some advice on changing the weapon model on the unit (if possible), when the ability is used.



None.

Sep 9 2010, 7:51 pm Biophysicist Post #2



To change the weapon, you'd need to give the unit both weapons and disable the "buff weapon", and have a behavior that enables it and disables the default one. Specifics will be posted when I get home and can use GE.

Changing the unit's model will require actually you to have the normal model and a copy with the "buff weapon" instead of the standard one. If you have that, then it's easy: In the actor, define events for when the behavior starts and stops that use "Model Swap" to change the model. (I believe it would be something like "Behavior.WeaponSwap.On" for the start event, and "Behavior.WeaponSwap.Off" for the end event, but I can't check that right now.)



None.

Sep 9 2010, 8:01 pm Anogio Post #3



I managed to figure out the weapon swapping mechanism, and it was exactly as you said. Thanks!

Regarding changing models, it is a swap between a marine and the tychus model, with minigun, however I want to retain colour if at all possible.



None.

Sep 9 2010, 8:07 pm Biophysicist Post #4



Okay. Have an actor event that switches the marine to Tychus when the buff is activated and turns him back when it ends.

@retaining color: What do you mean by that? ;o



None.

Sep 9 2010, 9:33 pm Anogio Post #5



By retaining colour, I mean that if the player colour is red, then the new model will also be red. i don't know if this happens by default as i don't know how to swap models in the first place lol



None.

Sep 9 2010, 9:51 pm Project100 Post #6



I believe tychus' armor stays blue no matter what, he has no player color flags.



None.

Sep 11 2010, 4:03 am Jack Post #7

>be faceless void >mfw I have no face

You can, of course, change his emit(I think it's emit at least) dds alpha to change the player colour.

Unless no player colour flags means that no matter what the texture is, he still doesn't change colour.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:08 pm]
Oh_Man -- example of wat u mean?
[05:59 am]
NudeRaider -- *is
[05:17 am]
NudeRaider -- despite all its flaws the sound design its fantastic
[10:29 pm]
Oh_Man -- homeworld 3 = massive disappointment
[2024-5-14. : 10:05 am]
Moose -- ya
[2024-5-14. : 5:23 am]
zsnakezz -- yes
[2024-5-12. : 8:51 pm]
l)ark_ssj9kevin -- Are you excited for Homeworld 3?
[2024-5-12. : 8:44 pm]
l)ark_ssj9kevin -- Hi Brusilov
[2024-5-12. : 4:35 pm]
O)FaRTy1billion[MM] -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
my server that was hosting it died
[2024-5-10. : 8:46 pm]
NudeRaider -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
https://armoha.github.io/eud-book/
Please log in to shout.


Members Online: Ultraviolet, 2claudiac812rh0