Is there a way to check if the player is frozen? Preferably in ACS.
Bizarrely there's SetPlayerProperty, but no GetPlayerProperty.
No GetPlayerProperty? How to check if the player is frozen?
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: 24
- Joined: Mon Feb 13, 2023 1:34 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 7 x64
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
-
- Posts: 324
- Joined: Wed Aug 02, 2017 3:01 pm
- Location: Illinois
Re: No GetPlayerProperty? How to check if the player is frozen?
Well there is GetActorProperty but I don't think it can check to see if you are frozen. If you want that you have to modify the 'Ice' state. Here is the Ettin's 'Ice' state from the wiki:
You could easily slip in a new line to run an ACS script or whatever.
Code: Select all
Ice:
ETTN R 5 A_FreezeDeath
ETTN R 1 A_FreezeDeathChunks
Wait
-
- Posts: 40
- Joined: Sat Jul 09, 2022 2:51 am
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: Houston, TX, USA
Re: No GetPlayerProperty? How to check if the player is frozen?
I think OP is referring to PROP_FROZEN from SetPlayerProperty, not anything to do with FreezeDeath.
GrayFace, you might need to track whether the player is frozen via a global variable instead.
Andarch
The DANDY Company
GrayFace, you might need to track whether the player is frozen via a global variable instead.
Andarch
The DANDY Company
-
-
- Posts: 1805
- Joined: Sun Jul 21, 2019 8:54 am
Re: No GetPlayerProperty? How to check if the player is frozen?
If you don't mind a little ZScript, you can also use ScriptCall like this:
Code: Select all
//In ZScript
Class FreezeChecker{
Static bool CheckFreeze(Actor activator){
If(!activator||!activator.player){Return false;}
Return activator.player.cheats & CF_FROZEN;
}
}
//In ACS
ScriptCall("FreezeChecker","CheckFreeze")