So, I've got a Kill script going in ACS that does stuff to the calling actor after a delay. There's a bit of a quirk with this in that if it's something like a Pain Elemental, which just "goes away" after it dies, the script just breaks because the calling actor no longer exists. Due to the nature of what needs to be done, the delay HAS to be in place.
So, as I asked in the title, is there any way I can check to see if the calling actor still exists?
How to check if calling actor still exists? (ACS)
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!)
- Void Weaver
- Posts: 724
- Joined: Thu Dec 18, 2014 7:15 am
- Contact:
Re: How to check if calling actor still exists? (ACS)
IsPointerEqual
Ofc you should perform IsPointerEqual check OUTSIDE of diyng actor but not from himself, since an caller can't return something like as "I am isn't existed anymore" as result in expression like as If(IsPointerEqual(AAPTR_DEFAULT,AAPTR_NULL)==1){//Do stuff}
Ofc you should perform IsPointerEqual check OUTSIDE of diyng actor but not from himself, since an caller can't return something like as "I am isn't existed anymore" as result in expression like as If(IsPointerEqual(AAPTR_DEFAULT,AAPTR_NULL)==1){//Do stuff}