[DECORATE&ACS] Morphing player and restricting weapons?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

[DECORATE&ACS] Morphing player and restricting weapons?

Postby Recurracy » Tue Feb 23, 2021 4:07 pm

Hi,

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.
User avatar
Recurracy
Break out the buttah
 
Joined: 19 Dec 2008

Re: [DECORATE&ACS] Morphing player and restricting weapons?

Postby Jarewill » Tue Feb 23, 2021 5:17 pm

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.

Here's an example I made a long time ago:
Spoiler:

PowerMorph.MorphStyle flags can be found here.
Jarewill
 
 
 
Joined: 21 Jul 2019


Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests