KillObject

From Soldat Community Wiki
Revision as of 11:30, 4 June 2014 by ElMorvano (talk | contribs) (Examples)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

From the Scripting Manual

procedure KillObject(ObjID: integer): integer;

Parameter Info:
 ObjID (Integer): ID of the object to be destroyed (Created with SpawnObject)

Description:
 This function will delete an object created with the SpawnObject function

Examples

var
  i: integer;
begin
  i := SpawnObject(GetPlayerStat(1,'x'),GetPlayerStat(1,'y'),5);
  sleep(5000);                                // better don't use sleep because it will stop your server for 5 secs
  KillObject(i);
  // This will spawn a Spas 12 above player 1, wait 5 seconds and destroy it if it exists.
end;

External Links