Any possibility of changing the player's class each level?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
MetroidJunkie
Posts: 709
Joined: Fri Aug 19, 2011 7:27 am

Any possibility of changing the player's class each level?

Post by MetroidJunkie »

I had an idea of a mod where you play as a different kind of creature in each level and you just get through how they would, sort of having to adapt your strategy each time. I could probably achieve this just by switching the player's available weapons but I'd rather the third person avatar also change each time in addition to all of the player properties.
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: Any possibility of changing the player's class each leve

Post by edward850 »

Do you love ignoring responses or something?
MetroidJunkie wrote:How to make the player be a different class from level to level? They're custom levels so ACS will work.
edward850 wrote:You don't. The player class isn't designed to be dynamically changed.
You can morph them, but it's designed for a specific function, and as such the weapon system has drastic limitations.
User avatar
MetroidJunkie
Posts: 709
Joined: Fri Aug 19, 2011 7:27 am

Re: Any possibility of changing the player's class each leve

Post by MetroidJunkie »

So am I better off asking in Feature Suggestions or is it literally 100% impossible for Doom to ever do anything remotely by this because, reasons? I'm aware that you told me how it was designed to be but I was wondering if there was any possible work-around that could be done to achieve this.


Update: So I was given advice by scifista42 on DoomWorld to use state jumps with dummy inventory items to change the player's avatar which, combined with changing the properties, could make a worthy substitute for actually changing the class so I guess it works as an alternative, I'll simply clear the player's inventory at the beginning of each level, adding on the "weapons" of each creature in question and the dummy item, so I guess that works. :wink:
User avatar
insightguy
Posts: 1730
Joined: Tue Mar 22, 2011 11:54 pm

Re: Any possibility of changing the player's class each leve

Post by insightguy »

MetroidJunkie wrote:Update: So I was given advice by scifista42 on DoomWorld to use state jumps with dummy inventory items to change the player's avatar which, combined with changing the properties, could make a worthy substitute for actually changing the class so I guess it works as an alternative, I'll simply clear the player's inventory at the beginning of each level, adding on the "weapons" of each creature in question and the dummy item, so I guess that works. :wink:
...I think morphing is a better alternative, cause that sounds like a real bitch to code.
User avatar
MetroidJunkie
Posts: 709
Joined: Fri Aug 19, 2011 7:27 am

Re: Any possibility of changing the player's class each leve

Post by MetroidJunkie »

insightguy wrote: ...I think morphing is a better alternative, cause that sounds like a real bitch to code.
Doesn't morphing restrict the weapons system, as edward mentioned?
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: Any possibility of changing the player's class each leve

Post by edward850 »

Indeed. A morphed player can only have 1 weapon.
If how an actor looks is all you care about, you can swap states quite simply:

Code: Select all

  See:
	PLAY A 0 A_JumpIf(an_expression == 1, "See1")
	PLAY A 0 A_JumpIf(an_expression == 2, "See2")
  See1:
	PLAY ABCD 4 
	Loop
  See2:
	PLAZ ABCD 4 
	Loop
User avatar
Cryomundus
Posts: 497
Joined: Thu Oct 31, 2013 12:33 pm

Re: Any possibility of changing the player's class each leve

Post by Cryomundus »

So, what, you could do something like giving a player an inventory item when entering a map via a script or something, and have the state change based on what item they've been given for the map? (and then have the item removed on exit)

Sounds very doable, actually (I think this is something like what Beast Incarnation, a Zandronum mod, does).
User avatar
MetroidJunkie
Posts: 709
Joined: Fri Aug 19, 2011 7:27 am

Re: Any possibility of changing the player's class each leve

Post by MetroidJunkie »

Come to think of it, I probably don't even have to use a dummy item if the state change can work for weapons held because I'm going to give the player weapons to represent that creature, anyway.
User avatar
Galaxy_Stranger
Posts: 1326
Joined: Sat Aug 16, 2003 11:42 pm
Location: Shropshire
Contact:

Re: Any possibility of changing the player's class each leve

Post by Galaxy_Stranger »

Is there any real reason why morphed players couldn't be given the ability to carry multiple weapons in the future?
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: Any possibility of changing the player's class each leve

Post by edward850 »

It's the side effect of the original morph function being designed for one very specific case. From what I understand, it would take rewriting the entire morph function to handle inventory and weapons appropriately.

It's not as if nobody would want that, mind you. It's just one of those time cost things.
Locked

Return to “Editing (Archive)”