Player sprite for weapon

Maps, modifications, add-ons, projects, and other releases for Zandronum. Also includes announcers.
Post Reply
Hece
Forum Regular
Posts: 114
Joined: Wed Jun 06, 2012 6:26 am
Location: Phobos

Player sprite for weapon

#1

Post by Hece » Thu Sep 13, 2012 5:35 pm

How can I make player sprite to change if I switch weapon?
For example: If I use fist, player sprite switches (into one with fist)
.
.
HeroWars - Beta released, Currently under deveploment.

TerminusEst13
Retired Staff / Community Team Member
Posts: 865
Joined: Tue Jun 05, 2012 11:06 pm

RE: Player sprite for weapon

#2

Post by TerminusEst13 » Thu Sep 13, 2012 6:05 pm

I'd assume a LOT of A_JumpIfInInventory checks.

Every time the weapon raises and lowers, give or take a "WieldingWeaponX" dummy inventory item. And on the PlayerPawn, have an A_JumpIfInventory check for the item, then jump to the appropriate set of sprites.

User avatar
Weiss
 
Posts: 61
Joined: Tue Jul 03, 2012 5:29 pm
Location: TX, USA
Contact:

RE: Player sprite for weapon

#3

Post by Weiss » Thu Sep 13, 2012 6:25 pm

Actually if I remember right there's a bit of code, something like PrefferedSkin or something... I'm not sure though, since I don't code. I do know FOR SURE that it's been done though.
Image


Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: Player sprite for weapon

#5

Post by Ijon Tichy » Thu Sep 13, 2012 10:22 pm

Weapon.PreferredSkin "<skinname>"

and define the skin in a SKININFO or S_SKIN lump
Last edited by Ijon Tichy on Thu Sep 13, 2012 10:23 pm, edited 1 time in total.

Llewellyn
Forum Regular
Posts: 578
Joined: Mon Jul 02, 2012 7:12 am

RE: Player sprite for weapon

#6

Post by Llewellyn » Thu Sep 13, 2012 11:20 pm

Ijon Tichy wrote: Weapon.PreferredSkin "<skinname>"

and define the skin in a SKININFO or S_SKIN lump
Don't use S_SKIN if you plan on putting it with the rest of your mod.
Any wad with an S_SKIN lump, the rest is ignored (except sprites in SS_START/SS_END lumps because they're part of the SKIN namespace). SKININFO only works with Skulltag/Zandronum.
Last edited by Llewellyn on Thu Sep 13, 2012 11:21 pm, edited 1 time in total.

Post Reply