Check for status of actor

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

FatalOverdose

New Member
Oct 13, 2003
6
0
0
hi, i asked at wiki help desk ;-
If i have already got a valid ref to an actor is there a standard/simple way of checking if that actor is a live or has been destroyed?

i was advised that this could be done by simply checking the variable holding the ref

Code:
if(refActor == None)
{
//Do this stuff if the actor has been destroyed (or the actor wasn't referenced succesfully
}
else
{
//Do this stuff if the actor is alive and referenced properly
}
so i tried a small test ;-
Code:
class touchActor extends trigger
placeable;

function touch(actor other)
{
if (other.IsA'vehicle')
   {
    VecRef=Vehicle(other);
    settimer(1,true);   
   }
}

function timer()
{
log ("Vecref = "$vecref);
}

but the variable VecRef dosent change when the vehicle is destroyed. Which is how i would have expected it to behave in the first place.
Have i missunderstood the reply at all?