SpawnAI
Adds an enemy or friend to the battlefield.
Code
local table = {
name = "Goblin_L2",
relationship = "Bad",
shouldStay = "Yes",
}
function table:Start()
self.fc = CL.CharacterMgr.Instance:SpawnRole(self.name)
if self.fc ~= nil then
self.fc.trans.position = self.spawnPosition.position
self.fc.trans.rotation = self.spawnPosition.rotation
end
self.fc.attr.camp = self.relationship
if self.shouldStay == "Yes" then
self.fc.ai:StayCommand()
end
end
return Class(nil, nil, table)