moonfall/Assets/Scripts/.svn/text-base/WorldDefault.lua.svn-base

16 lines
406 B
Plaintext
Raw Normal View History

2014-10-21 04:54:42 +00:00
function OnWorldCreate(parameters)
local spawnId = nil
if parameters.spawn == nil then
spawnId = ActorFromName("spawnDefault")
else
spawnId = ActorFromName(parameters.spawn)
end
if spawnId ~= nil then
playerId = ActorScriptSendMessage(spawnId, "spawn").playerId
if playerId ~= nil then
CameraSetTargetActor(playerId)
end
end
end