System SpawnEntity

From CryWiki

Jump to: navigation, search

System.SpawnEntity(table)

Description

Spawns an entity.

Arguments

  1. Table with entity info

Returns

The entity

Example

Lua (example)
-- Warning, this might kill you because a vehicle will spawn on the player.
local myEnt = {};
myEnt.class = "US_apc";
myEnt.position = g_localActor:GetPos();
myEnt.name = "MyApc";      
local myEntId = System.SpawnEntity(myEnt);


Personal tools