DestroyPersistentObject(persistentObjectId)

Description

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

Syntax

DestroyPersistentObject(persistentObjectId)
Argument
Description

persistentObjectId

The ID of the persistent object. (this is RNet's Per. Obj. ID, not GM instance or GM object ID) This must be a Number.

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