Change Player skin mid-game
-
- Posts: 37
- Joined: Wed Mar 13, 2013 12:53 am
Change Player skin mid-game
Is there a way to change a player's skin upon picking up a custom inventory item?
RE: Change Player skin mid-game
You could put a bunch of custom states in the player actor's DECORATE and then use A_JumpIfInventory.RobbyPants wrote: Is there a way to change a player's skin upon picking up a custom inventory item?
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

-
- Posts: 37
- Joined: Wed Mar 13, 2013 12:53 am
RE: Change Player skin mid-game
Can that change the skin?Ænima wrote: You could put a bunch of custom states in the player actor's DECORATE and then use A_JumpIfInventory.
I want to do this because the player's skin is what's used in GLDEFS for giving the player a light source. I wanted to have a flashlight item, that if possessed, would make the player "glow". It's easy enough for me to set this to always be on, but I'd like it if it would start off and only work once the player picks the flashlight up.
RE: Change Player skin mid-game
I told you how to do it in the other thread ...
Do you want the player's skin to be changed? In other words do you want this to work with custom skins or are you forcing a certain set of sprites on every player?
Do you want the player's skin to be changed? In other words do you want this to work with custom skins or are you forcing a certain set of sprites on every player?
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

-
- Posts: 37
- Joined: Wed Mar 13, 2013 12:53 am
RE: Change Player skin mid-game
I'll take a look at that one, again.Ænima wrote: I told you how to do it in the other thread ...
Do you want the player's skin to be changed? In other words do you want this to work with custom skins or are you forcing a certain set of sprites on every player?
The map is made for just a single player, so I don't particularly care what the skin looks like. I just need a way to differentiate two different sprites in GLDEFS based on the presence or absence of an inventory item.
RE: Change Player skin mid-game
So then make an identical copy of all your PLAY* sprites but rename them PLA2 or something. Then make a seperate set of See, Pain, Spawn, Melee, and Missile states that are exactly the same as the normal player states, just with PLA2 instead of PLAY. Make sure you put a A_JumpIfInventory at the beginning of all your "normal" states and make it jump to the PLA2 version of that state if the flashlight is equipped. Then go into GLDEFS and attach the light to PLA2 on your player actor.
It might even be easier to just have an ACS script that spawns an invisible actor (TNT1A0) from the player every single tic, and spawn it using the player's x,y,z velocity so that it stays MOSTLY sync'd with the player's movement. Then just attach the GL light to that actor. It won't look 100% as smooth as using the player themself as the light origin but if it's singleplayer I don't think anyone will notice.
It might even be easier to just have an ACS script that spawns an invisible actor (TNT1A0) from the player every single tic, and spawn it using the player's x,y,z velocity so that it stays MOSTLY sync'd with the player's movement. Then just attach the GL light to that actor. It won't look 100% as smooth as using the player themself as the light origin but if it's singleplayer I don't think anyone will notice.
Last edited by Ænima on Sat Jan 30, 2016 8:38 pm, edited 1 time in total.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

-
- Posts: 37
- Joined: Wed Mar 13, 2013 12:53 am
RE: Change Player skin mid-game
That separate object thing is actually a really good idea. Thanks.
The separate object thing had too many odd side effects. The light would disappear when I got next to a wall or went up stairs, but would come back if I moved or went down. I might have been able to tweak the spawn height, but I ultimately made the extra player sprites and states, and it worked great! Thanks for the advice!
The separate object thing had too many odd side effects. The light would disappear when I got next to a wall or went up stairs, but would come back if I moved or went down. I might have been able to tweak the spawn height, but I ultimately made the extra player sprites and states, and it worked great! Thanks for the advice!
Last edited by RobbyPants on Sat Jan 30, 2016 9:38 pm, edited 1 time in total.