DestroyPersistentObject(persistentObjectId)

Description

This function destroys a persistent object after you provide its ID.

Syntax

DestroyPersistentObject(persistentObjectId)

Returns

N/A

Example Implementation

//Get the ball first (assuming you dont know its POid)
var ballPOid = -1;

with(oPersistentObject){
    if(persistentObjectProperties.type == "ball"){
        ballPOid = persistentObjectId
    }
}

DestroyPersistentObject(ballPOid)

This requests the server to destroy the ball.

Last updated