Causing pain state to master
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!)
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!)
-
- Posts: 21
- Joined: Wed Feb 16, 2022 9:04 pm
- Graphics Processor: nVidia with Vulkan support
Causing pain state to master
To my knowledge there isn't a decorate function that allows you to cause a master to go into a pain state. With zscript and pointers it may be possible. How could I go about doing this?
-
- Posts: 8
- Joined: Sun Jan 02, 2022 7:19 am
Re: Causing pain state to master
You can make ZScript function like this:
then just use the A_PainMaster function in the actor's states wherever you want.
Code: Select all
void A_PainMaster()
{
if (master && master.health > 0) // check that master exists and is not dead
{
master.SetStateLabel("Pain");
}
}
-
- Posts: 21
- Joined: Wed Feb 16, 2022 9:04 pm
- Graphics Processor: nVidia with Vulkan support
Re: Causing pain state to master
Gonna try it out, thanks.