Having trouble with inherited classes

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!)
Post Reply
Guest

Having trouble with inherited classes

Post by Guest »

I'm not a habitual user but i figured out if anyone could help it would be you guys, so i have this actor
[code]Actor BaseMonster
{
...
States
{
Pain.Upgrader:
"####" "#" 1 ACS_ExecuteAlways(113, 0, 0)
Goto See
}
}
[/code]
no other states are defined in this base monster. now all the actors that inherit from it, when they receive this pain type, they disappear! How do i make them behave correctly? Do i have to manually add this to every single goddamn actor? Thanks
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Having trouble with inherited classes

Post by Blue Shadow »

I imagine it tries to go to the See state of the base actor, which does not exist according to what you said. Try replacing the "Goto See" line with this one, and see if it works.

Code: Select all

"####" "#" 0 A_Jump(256, "See")
Panus
Posts: 4
Joined: Sun Jan 22, 2017 9:58 am
Location: dancing

Re: Having trouble with inherited classes

Post by Panus »

Blue Shadow wrote:I imagine it tries to go to the See state of the base actor, which does not exist according to what you said. Try replacing the "Goto See" line with this one, and see if it works.

Code: Select all

"####" "#" 0 A_Jump(256, "See")
well, that was a freebie, thanks a lot, it works!
Post Reply

Return to “Scripting”