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)
Player sprite for weapon
-
- Retired Staff / Community Team Member
- Posts: 865
- Joined: Tue Jun 05, 2012 11:06 pm
RE: Player sprite for weapon
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.
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.
RE: Player sprite for weapon
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.
-
- Frequent Poster Miles card holder
- Posts: 901
- Joined: Mon Jun 04, 2012 5:07 am
RE: Player sprite for weapon
Weapon.PreferredSkin "<skinname>"
and define the skin in a SKININFO or S_SKIN lump
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.
RE: Player sprite for weapon
Don't use S_SKIN if you plan on putting it with the rest of your mod.Ijon Tichy wrote: Weapon.PreferredSkin "<skinname>"
and define the skin in a SKININFO or S_SKIN lump
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.