A way to set classes through ACS?

Moderator: GZDoom Developers

Post Reply
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

A way to set classes through ACS?

Post by Ryan Cordell »

As the title said, and I know it's gonna be NO'd, would it be too much work for a feature implentation for ACS to be able to force a player class onto a player?

(Say you're a marine, then at some point later, the game has you transform into a demon. All through ACS)

Or is it already possible?


Guess I'm thinking of things like this:

Code: Select all

SCRIPT 421 ENTER
{
   int PTID = Thing_ChangeTID(0, PlayerNumber()+256);

   if(PlayerClass("NewDoomPlayer")!=0)
   {
      SetPlayerClass("TITANMech");
      if(vehicletype==1)
      {
         Thing_Remove(5);
         GiveInventory("EnteredMechCheck",1);
         Spawn("Use-TITAN_Mech",GetActorX(PTID)+45,GetActorY(PTID)+45,GetActorZ(PTID),0,0);
      }
   }
   else if(PlayerClass("TITANMech")!=0)
   {
      Terminate;
   }
}
Last edited by Ryan Cordell on Thu May 10, 2007 12:33 pm, edited 1 time in total.
User avatar
Nash
 
 
Posts: 17487
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

This has been asked many, many times for as far as I can remember (at least when I joined the NotGod ZDoom "phorum" in 2002).

(Incidently, this is my response everytime this feature request comes up!)

Apparently it's not easy. That's also the reason why Hexen's change class cheat isn't implemented yet.

Anyway just wait for it. Sooner or later it'll be in. I know I've been waiting for 5 years already!
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

Post by Ryan Cordell »

(Funny I haven't seen it in closed feature suggestions yet, but I'm just attracting Graf's ire now. ;))

And alright, to be honest, this is all about vehicles/cars that I'm trying to get it work, and I already went by the decorate method, which wasn't my cup of tea. Enterable and exitable whenever you wish, damage it when you're outside of it to destroy it, be hurt enough inside to die too. That's the main reason actually. :(
User avatar
Anakin S.
Posts: 1067
Joined: Fri Nov 28, 2003 9:39 pm
Location: A long time ago in a galaxy far, far away...

Post by Anakin S. »

Can you hack it by using a custom morph projectile?
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

Post by Ryan Cordell »

Here's a quick scenario with that done with the previous method:

You went up to the 'Titan MECH' actor, it's melee state fired a morphing projectile to you. You became the MECH as the original one dissapeared. If you pressed a key to exit, the actor's sprites would somewhat freeze in place, and if I got THAT working right, the actor would revert to the class the player usually is (NewDoomPlayer), but doesn't act like the normal self. You don't get the assigned weapons, you can't crouch, the translation doesn't stick on, etc etc.

So, no dice.
User avatar
Nash
 
 
Posts: 17487
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

You can't hack around with custom morphs - I've tried it before. You will sitll revert back to your original player form.
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

Post by Ryan Cordell »

Which apparently just makes the +STAYMORPHED flag pretty useless.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Graf has already said the flag was never intended to work on players. It's meant for enemies that shouldn't recover from a morph ovum, not to be a hack allowing you to change the player's class. A proper implementation of that functionality will be needed and you're far from the only person to want one.
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Re: A way to set classes through ACS?

Post by Ghastly »

I just recently thought up a way to make an Enemy Territory: Doom Wars mod for Skulltag, but it needs a way of changing player class in ACS (so you're demons on red team and players on blue).

To make this, can't you change player class as though you changed it from the multiplayer menu in Skulltag (only works when you die/respawn/spectate), and reset the player (keeping the players' inventory, if possible)?
User avatar
Kate
... in rememberance ...
Posts: 2975
Joined: Tue Jul 15, 2003 8:06 pm

Re: A way to set classes through ACS?

Post by Kate »

User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Re: A way to set classes through ACS?

Post by Ghastly »

I can't really use something like that for an ET:DW mod XD.

I was going to make base classes (fighting, demo, healing, tech), and when a player joins a specific team, change class to something else and give the weapons, items and ammo such a class would have (Fighting becomes a Hell Knight when it joins the red team, for example).
User avatar
bagheadspidey
Posts: 1490
Joined: Sat Oct 20, 2007 10:31 pm
Contact:

Re: A way to set classes through ACS?

Post by bagheadspidey »

Blade Nightflame wrote:And alright, to be honest, this is all about vehicles/cars that I'm trying to get it work, and I already went by the decorate method, which wasn't my cup of tea. Enterable and exitable whenever you wish, damage it when you're outside of it to destroy it, be hurt enough inside to die too. That's the main reason actually. :(
Here's a horrible ACS hack that might actually work for your particular situation. Instead of removing the vehicle from the map, you could "remove" the player and transfer control to the vehicle. It would depend on a custom map, though... Here's an example.

- You walk up to the 'Titan MECH' actor, its melee state activates a script that does the following...
- Set the camera to the vehicle, so the player "sees what it sees."
- Move the player into a square room with four line teleports, so that the player can run in any direction forever.
- Do the following stuff in a loop, every tic or so...
- Monitor changes in player's position, angle, and ammo. Monitor changes in vehicle's health.
- Use changes in player's position and angle to determine what direction the vehicle should be moving and facing.
- If player's ammo changed, have vehicle fire a shot.
- If vehicle is destroyed (has < 1 health), exit loop, move player to vehicle's position, kill player.
skadoomer
Posts: 1026
Joined: Fri Sep 05, 2003 12:49 pm

Re: A way to set classes through ACS?

Post by skadoomer »

I think the current issue with changes classes is the handling of the players inventory and whats allowed to transition over and what isn't. I remember randy saying a while back (in a related question involving morphing maybe?) that inventory handling for when one actor changes classes and then back to the original class (or multiple class changes) left the current inventory in limbo. It may not seem like a big deal because I think those of us that wanted the feature only though about setting the player class during the enter state of a map, but since others where more into drivable actors (which would be achieved the same way), the inventory became a problem.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”