Underwater Vision
From FleshWorks
by ascottk
Intro
Well, we don't have swimmable water yet but here's a start.
Vision Distortion
- First go to the level properties (F6) then set bDistanceFog and bFogZone in ZoneInfo to True. You could change fog color to whatever you like and set DistanceFogEnd and DistanceFogStart to 0 under ZoneLight.
- If you have a dry canal or something of the sort and follow the directions for ShallowWater, you'll have your water.
- Make some scripts, one that changes vision when you go into the ShallowWaterVolume and one that changes back.
First script (I named WaterEnter)
Send trigger message [WorldMode] (Not sure this is necessary)
Activate screen tinting to RGBA [10] [150] [150] [25] (change if you like)
Change level fog range settings to Start: [10.00], End: [1800.00], over [0.50] seconds.
Set [BaseFOV] to [46.00] on linked objects of [PLAYER]
Reset script conditions and actions
Second script (WaterExit)
Just like the first except:
Deactivate screen tinting
Change level fog range settings to Start: [0.00], End: [0.00], over [0.50] seconds.
Set [BaseFOV] to [85.00] on linked objects of [PLAYER]
Reset script conditions and actions
Attach those scripts to the ShallowWaterVolume and you could add the ForceFirstPerson and UnlockFirstPerson scripts too (Under cameraFunctions). WARNING: when the fog settings on your level is set to zero, all you see is the color of your fog when you Toggle Flesh Render Output. If you want to tweak your lights then disable fog in the level properties.
Adding Bubbles
WARNING: This includes modifying the gamesys!
- Follow UDN's Bubbles Emitter Tutorial. The bubbles here are too big. I made mine 2.0 MAX, 0.2 MIN on XYZ.
- Add a RigidAttachment link from the Bubble to the PlayerGarrett archetype in the Actor Class Browser.
- Attachment -> m_attachmentBone:
- Attachment -> m_parentBone: lip_t_center
- Hidden -> bDontPropogateHiddenFlagToChild: False
- Highlight -> bPropagatesHighlight: False
- Lifetime -> bDeleteChildOnDeath: True
- Link -> m_GroupName: None
- Link -> m_name: Bubbles
- Spawn -> bDontSpawn: True
- Add a flag called WaterEnterPlayer
- Add a couple of scripts for when the player enter a volume
Volume Script
PlayerGarrett Script (attach to PlayerGarrett Archetype)
Spawn and attach object type of RigidAttachment Link(s) with name [Bubbles] to me
Reset script conditions and actions
Do the opposite for exiting the water:
Back to Mission Design: Environmental
