Whenever I use the following code, it will only create one entity using the first vector:
[lua]
local Canisters = {
Vector(-5714.232421875, -7911.0551757813, 70),
Vector(-7039.1655273438, -7534.3193359375, 70),
Vector(-7295.431640625, -5735.9267578125, 70),
};
local function SpawnCanisters ( )
for k, v in pairs(Canisters) do
Canister = ents.Create(“prop_physics”);
Canister:SetModel(“models/props_c17/canister02a.mdl”);
Canister:SetPos(v);
Canister:Freeze();
Canister:Spawn();
end;
end;
timer.Simple(1, SpawnCanisters);
[/lua]
Anyone have any idea how to make it spawn an entity for each vector in the table?