Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
VGamingJunkie

Morphing issues

Recommended Posts

The idea is to allow the player to change among 9 classes anytime they want and with the weapons they hold changing to match the new class. It was suggested I use morphing so I made a custom weapon to serve as a communicator to call another class and, in the firing state, added;

ACS_Execute(901,0,0,0)


The ACS script itself is;


Script 901 (void)
{
MorphActor(0,"SecondPlayer",0,0,0);
TakeInventory("SecondClassCommunicator",1);
GiveInventory("FirstClassCommunicator",1);
}


It morphs but it seems to generate a new player ontop of the morph that I have to either kill by shooting or no clip out of. The class the player morphs into also can't use any weapons aside from the initial morphed weapon (So I can't have them switch to a communicator to morph them back into the original class or any other class) and morphing only appears to work once as I attempted to have switches to force the player to morph back to the first class or other classes.

Share this post


Link to post

I just copied this from a very simple morph experiment I did long ago. Don't remember specifics like if decorate was used but maybe it might help.
2 walk over lines used "script execute" for script 1/2 respectively

#include "zcommon.acs"

script 1 (void)
{
	unmorphactor(0,1);
	MorphActor(1337, "player01", "", 1048576, 0, "", "");
}

script 2 (void)
{
	unmorphactor(0,1);
	MorphActor(1337, "player02", "", 1048576, 0, "", "");
}

Script 3 ENTER
{
Thing_ChangeTID(0,1337+PlayerNumber());//This assigns the TID
}

Share this post


Link to post

It didn't fix the problem, there's still a second player spawned on top that has to be killed from the inside or clipped through and only the morphed weapon can be used.

Share this post


Link to post

This might not help, but this is my old wad of a very brief morph experiment before I knew much acs or decorate so stuff might be wrong (zdoom). But I mean it works- you walk over a line and morph into a smaller player class, walk over another and morph into the smallest (neither had weapons though). No problem where you morph on top of yourself or whatever that you have.
http://filesmelt.com/dl/morph.wad
You want it so when you shoot you morph? Like shoot once, morph to playerclass2, shoot again morph to playerclass 3, again to 4, etc all the way back to 1?

Share this post


Link to post

Well, the custom weapon is meant to be specifically for the purpose of calling a different class whenever you choose to switch characters. It's meant so you can change to a different character ingame with their unique weapons. Is it possible to have more than one weapon with a morphed actor?

I took your WAD, modified it for the specifications of my mod, and it doesn't spawn a second player anymore and I can morph multiple times but it's still stuck to just one weapon. I guess, if I have to, I can just get rid of the custom weapon and make it a specific spot where you can change the character.

Share this post


Link to post

Someone else can probably help better than me, but I was only able to get 1 gun working for a morphed player too.

I added this crap to decorate (from http://zdoom.org/wiki/Player_properties ):

        player.startitem "supershotgun"
	player.startitem "chaingun"
	player.startitem "plasmarifle"
	player.weaponslot 0, "plasmarifle"
	player.weaponslot 1, "supershotgun"
	player.weaponslot 2, "plasmarifle"
	player.weaponslot 3, "supershotgun"
	player.weaponslot 4, "plasmarifle"
	player.weaponslot 5, "supershotgun"
	player.weaponslot 6, "plasmarifle"
	player.weaponslot 7, "supershotgun"
	player.weaponslot 8, "plasmarifle"
	player.weaponslot 9, "supershotgun"
But the player has no start weapon nor can select weapons. Only player.morphweapon "chaingun" etc worked, but that's just 1 weapon when more were wanted.



EDIT: probably figured it out, have to give AMMO as start items too, duh!



EDIT: no, ammo wasn't it. Maybe try putting inventory functions in the states of the new decorate players.
http://zdoom.org/wiki/Action_functions#Inventory_functions
Like put A_GiveInventory("plasmarifle", 3) in the spawn state of the player or something.
I would try but xwe corrupted my stupid morph wad and don't want to hassle w it anymore.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×