For my mod, I want to turn the player into another PlayerPawn derisive actor, and restrict his available weapons to a melee weapon. However, when he morphs back into the regular PlayerPawn, he should keep his original weapons. Is such a thing possible? If so, how do I do it?
Mind I'm developing for zandro, so no zscript sadly.
You can use PowerMorph for that. You will have to use Player.MorphWeapon for the melee weapon though. The state of the player is preserved mostly fine, the player keeps their weapons, but the armor gets removed.
ACTOR BaronPlayer : PlayerPawn //Definition is mostly the same {//I don't remember if most of this is needed or not, it's been a while since I messed with this feature Health 1000 Radius 24 Height 64 Mass 1000 Speed 1 PainChance 255 +NOSKIN PainSound "baron/pain" DeathSound "baron/death" Player.DisplayName "Baron of Hell" Player.Viewheight 56 Player.ForwardMove 0.5, 0.5 Player.SideMove 0.5, 0.5 Player.MorphWeapon "BaronFist"//This will be the morphed player's weapon Player.DamageScreenColor "green" Player.Face "BOS" -PICKUP States { Spawn: BOS3 B -1 Stop See: BOS3 AABBCCDD 3 Loop Melee: Missile: BOS3 EFG 8 Goto Spawn Pain: BOS3 H 2 BOS3 H 2 A_Pain Goto Spawn Death: BOS3 I 8 BOS3 J 8 A_Scream BOS3 K 8 BOS3 L 8 A_NoBlocking BOS3 MN 8 BOS3 O -1 Stop } }
ACTOR BaronMorph : PowerupGiver { Inventory.PickupMessage "You feel your body morphing." Powerup.Type Baron Powerup.Duration 1400 +COUNTITEM +FLOATBOB +INVENTORY.AUTOACTIVATE +INVENTORY.ALWAYSPICKUP States { Spawn: PBAR ABCD 6 Bright Loop } }
ACTOR PowerBaron : PowerMorph { PowerMorph.PlayerClass "BaronPlayer"//Name of the class the player morphs to PowerMorph.MorphStyle (MRF_FULLHEALTH|MRF_ADDSTAMINA|MRF_TRANSFERTRANSLATION)//Flags for the morph Inventory.Icon "SPMRPH0" }