Pain Elemental style ATTACK

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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England

Pain Elemental style ATTACK

Post by Hidden Hands »

I have replaced the Pain Elemental with a new monster and I have replaced the Lost Soul with a new monster. Now I have a problem. The Lost Soul replacement monster is being spawned by the Pain Elemental replacement monster. How can I change this so the Pain Elemental replacement monster spawns a DIFFERENT enemy instead of Lost Soul replacements? I want them to spawn an entirely different monster but am having no luck finding the DECORATE code for the actual attack that triggers the "Lost Soul".

Thanks in advance.

Code: Select all

A_PainAttack [(string spawntype [, float angle [, int flags [, int limit )]]]]
What would I need to do with this code to make it shoot my custom monster?
User avatar
Mikk-
Posts: 2274
Joined: Tue Jun 30, 2009 1:31 pm

Re: Pain Elemental style ATTACK

Post by Mikk- »

Really? It's the first argument. The code would go like

Code: Select all

A_PainAttack("MyCustomMonster")
in the missile state of your Pain Elemental replacement actor
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England

Re: Pain Elemental style ATTACK

Post by Hidden Hands »

Mikk- wrote:Really? It's the first argument. The code would go like

Code: Select all

A_PainAttack("MyCustomMonster")
in the missile state of your Pain Elemental replacement actor
Wow, I'm an idiot. Can't believe I couldn't do that. Thank you, works great.

Return to “Scripting”