
addstring 10 wanker
addstring 3 hobo
addstring 23 ali

// Create renderer

create D3DRenderer parent root1
link root1 TimeUpdate D3DRenderer TimeUpdate
//subcreate D3DRenderer GlobalEffect script Data\GlobalEffects\X_DepthOfField.txt
//subcreate D3DRenderer GlobalEffect script Data\GlobalEffects\X_MotionBlur.txt

// Create sunlight

subcreate D3DRenderer LightInstance name Light0
set Light0 Colour 0.4 0.5 0.8
set Light0 Intensity 0.8
set Light0 VisInfo 0.0 25.0 20.0 0.0 -2.5 -1

// Create scenery

subcreate D3DRenderer RenderInstance name Mesh
set Mesh DataFile Data\Mesh.txt

//subcreate D3DRenderer RenderInstance name Sky
//set Sky DataFile Data\SkyBox.txt

// Create input

create DXInput parent root0
link root0 TimeUpdate DXInput TimeUpdate

// Create PhysX

create Physics parent root0
link root0 TimeUpdate Physics TimeUpdate

// Create Audio

create Audio parent root0

// Create avatar

create Avatar parent root0
set Avatar Position 0.0 1.0 -5.0

subcreate Physics PhysicsAvatar
link Avatar Displacement PhysicsAvatar Displacement
link PhysicsAvatar Position D3DRenderer CamPos
set PhysicsAvatar Enable true


// Link input to avatar movement

link DXInput MouseClickLeft Avatar LookMode
link DXInput MouseMove Avatar LookMove
link DXInput Pressed_W Avatar MoveForwards
link DXInput Pressed_S Avatar MoveBackwards
link DXInput Pressed_Q Avatar MoveLeft
link DXInput Pressed_E Avatar MoveRight
link DXInput Pressed_R Avatar MoveUp
link DXInput Pressed_F Avatar MoveDown
link DXInput Pressed_D Avatar StrafeRight
link DXInput Pressed_A Avatar StrafeLeft

// Link avatar outputs

//link Avatar Position D3DRenderer CamPos
link Avatar Look D3DRenderer CamLook
link Avatar Up D3DRenderer CamUp

link Avatar Position Audio ListenerPos
link Avatar Look Audio ListenerLook
link Avatar Up Audio ListenerUp

// Create nodes to run scripts on input (to create physics objects)

create RunScript parent root0 name Run1
set Run1 ScriptFile Data\AddSphere.txt
link DXInput Hit_T Run1 Execute

create RunScript parent root0 name Run2
set Run2 ScriptFile Data\AddBox.txt
link DXInput Hit_G Run2 Execute

// Create gun manager and guns

create GunManager parent root0
//set GunManager AddGun Data\Guns\Pistol.txt
//set GunManager AddGun Data\Guns\Shotgun.txt
//set GunManager AddGun Data\Guns\MacPistol.txt
//set GunManager AddGun Data\Guns\Sniper.txt

// Shotgun inputs

link root0 TimeUpdate GunManager TimeUpdate
link Avatar Position GunManager Position
link Avatar Look GunManager Direction
link DXInput MouseClickRight GunManager Trigger
link DXInput Hit_Y GunManager ChangeGunUp
link DXInput Hit_H GunManager ChangeGunDown

// Fort physics

subcreate Physics PhysicsEntity name Fort
set Fort AddMaterial Data\PhysicsMaterials\Stone.txt
set Fort Density 0.0
set Fort AddMesh Data\Meshes\fort8.x
set Fort Enable true

// Explosion

//subcreate D3DRenderer RenderInstance name Particles
//set Particles DataFile Data\Particles.txt

//subcreate Physics PhysicsExplosion
//link PhysicsExplosion ParticleArray Particles ParticleArray

//link DXInput Hit_V PhysicsExplosion SpawnParticles

// Create ship

//subcreate D3DRenderer RenderInstance name ShipGfx
//set ShipGfx DataFile Data\Ship.txt

//create HoverShip parent root0
//set HoverShip CenterPos 0.0 5.0 -5.0
//set HoverShip SearchArea 20.0 0.0 20.0
//link HoverShip VisInfo ShipGfx VisInfo

//subcreate D3DRenderer LightInstance name ShipLight
//set ShipLight Colour 0.4 0.9 0.5
//set ShipLight Intensity 2.2
//set ShipLight FOV 45.0
//link Avatar Position HoverShip Target
//link root0 TimeUpdate HoverShip TimeUpdate
//link HoverShip LightVis ShipLight VisInfo

//link Avatar Look HoverShip CameraLookIn
//link HoverShip CameraLookOut D3DRenderer CamLook


