Skip to main content

Create

Creating a scene from scene data given by our powershell script.

Function

local Scene = WXS.Scene
Scene:Create(sceneData, sceneLocation, sceneRotation, actors, looped, useDelaZ, addCamera, manualSpawn)

Parameters

NameTypeDescription
sceneDatatableThe scene data given by our powershell script.
sceneLocationvector3The location of the scene.
sceneRotationvector3The rotation of the scene.
actorstableA table of actors to use in the scene.
loopedbooleanWhether or not the scene should loop.
useDelaZbooleanWhether or not the scene should use the deltaZ value.
addCamerabooleanWhether or not the scene should add a scene camera.
manualSpawnbooleanWhether or not the scene should auto spawn scene objects.

Returns

SceneHandler object.

Example

local Scene = WXS.Scene

local sceneData = {
['title'] = 'Store hold up cash',
['actorsAligned'] = true,
['deltaZ'] = 0,
['actorAnims'] = {
{
['id'] = 13107,
['dir'] = 'mp_am_hold_up',
['name'] = 'holdup_victim_20s',
['animIndex'] = 24133
},
},
['objectAnims'] = {
{
['id'] = 13108,
['dir'] = 'mp_am_hold_up',
['name'] = 'holdup_victim_20s_bag',
['animIndex'] = 21566
},
{
['id'] = 13109,
['dir'] = 'mp_am_hold_up',
['name'] = 'holdup_victim_20s_till',
['animIndex'] = 24133
},
},
['objects'] = {
`p_poly_bag_01_s`,
`p_till_01_s`,
},
}

local sceneLocation = vector3(0.0, 0.0, 0.0)
local sceneRotation = vector3(0.0, 0.0, 0.0)

Scene:Create(sceneData, sceneLocation, sceneRotation, {}, false, false, false, false)