A way to set classes through ACS?

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: A way to set classes through ACS?

Re: A way to set classes through ACS?

by skadoomer » Mon Mar 10, 2008 9:36 am

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.

Re: A way to set classes through ACS?

by bagheadspidey » Mon Mar 03, 2008 5:06 pm

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.

Re: A way to set classes through ACS?

by Ghastly » Mon Mar 03, 2008 11:12 am

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).

Re: A way to set classes through ACS?

by Kate » Sun Mar 02, 2008 9:42 pm

Re: A way to set classes through ACS?

by Ghastly » Sun Mar 02, 2008 9:08 am

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)?

by HotWax » Fri May 11, 2007 7:09 am

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.

by Ryan Cordell » Fri May 11, 2007 5:11 am

Which apparently just makes the +STAYMORPHED flag pretty useless.

by Nash » Thu May 10, 2007 3:27 pm

You can't hack around with custom morphs - I've tried it before. You will sitll revert back to your original player form.

by Ryan Cordell » Thu May 10, 2007 10:31 am

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.

by Anakin S. » Thu May 10, 2007 10:27 am

Can you hack it by using a custom morph projectile?

by Ryan Cordell » Thu May 10, 2007 7:10 am

(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. :(

by Nash » Wed May 09, 2007 6:48 pm

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!

A way to set classes through ACS?

by Ryan Cordell » Wed May 09, 2007 3:13 pm

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;
   }
}

Top