[skip all navigation]

Swapping weapons as part of a buff?

Creator: Anogio
Time: Sep 9 2010, 5:45 pm

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

[Avatar]
offlinecontact
Rank: Member
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.

Top

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

[Avatar]
:(){ :|:& };:
offlinecontact
Rank: Regular
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.)

Your trolltag is twinArmageddons and you tend two 2peak wiith a biit of a lii2p.
Top

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

[Avatar]
offlinecontact
Rank: Member
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.

Top

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

[Avatar]
:(){ :|:& };:
offlinecontact
Rank: Regular
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

Your trolltag is twinArmageddons and you tend two 2peak wiith a biit of a lii2p.
Top

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

[Avatar]
offlinecontact
Rank: Member
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

Top

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

[Avatar]
offlinecontact
Rank: Member
I believe tychus' armor stays blue no matter what, he has no player color flags.

Top

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

[Avatar]
Understanding breeds empathy.
offlinecontact
Rank: Regular
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.

Left SEN, I may pop in sometimes but I have more useful things to do with my time. If you need anything, email me at zany DOT wun AT gmail DOT com. Maybe I'll come back some day and be regular again but right now it's not for me.
gg
olo im still here till the 2011 last stand contest and these SD topics are done with
Top
0 members in this topic (italic members are currently writing a reply): None
+ guest(s)


[03:28 pm]
Roy -- That "Still" was so powerful it capitalized the first letter of the proceeding word.
[03:13 pm]
SmE(Raitaki -- Wondering if I have gone to the correct period or not :/
[03:12 pm]
SmE(Raitaki -- I STILL Spend half of my school periods walking to class and wn
[02:29 pm]
Roy -- I've seen replays of Temple Siege with that guy in it.
[12:38 pm]
Azrael.Wrath -- Just throwing that out there.
[12:38 pm]
Azrael.Wrath -- Also, Herbalogist is about the biggest degenerate I've had the displeasure of encountering in a long time, online or otherwise.
[12:36 pm]
Azrael.Wrath -- Back to doing turns.
Please log in to shout.