tsunami
A tsunami on the scene's ocean, starting at this object's position: one long travelling wave layered on the sea, a solitary hump or an N-wave whose trough comes first (the sea draws back off the beach, then the crest comes in). It travels at the speed the water's depth allows (√(g·depth); the terrain's seabed where there is one), slows, shortens and grows as the water shoals, breaks into white water and spray when too tall for the depth, and runs a little way inland. Boats and floating things ride it and are carried. Any change starts it over (watch it again while tuning). Scripts hear 'tsunami_arrival' { where, height, name } at landfall.
In scene text
tsunami { heading 1 amplitude 1 wavelength 1 }Add it in the Inspector (Add Component), in scene text as above, or ask your AI. Fields you leave out keep their defaults.
Fields 16
| Field | Type | Unit / range | What it does |
|---|---|---|---|
heading | number | deg, -360 … 360 | Compass direction it travels toward (0 north, 90 east). |
amplitude | number | m, 0 … 60 | Crest height above the sea in open water (it grows as it shoals). |
wavelength | number | m, 10 … 20 | Length of the hump in open water (it shortens in the shallows). |
shape | text | — | solitary: one hump. n_wave: a trough first (drawdown), then the crest. surf: a surf break, a steady train of waves (one every wavelength / open-water speed seconds) shoaling and breaking on the seabed, with a lip that throws forward; amplitude ~0.5-1.2 m, wavelength ~60-140 m, bore_distance ~20-40 m. |
drawdown | number | 0 … 1.5 | N-wave: depth of the leading trough as a share of the crest. |
depth | number | m, 0 … 8000 | Open-water depth at the start (speed √(g·depth)); 0 uses speed. Terrain under the sea overrides it there. |
speed | number | m/s, 1 … 250 | Open-water speed when depth is 0 (real ocean tsunamis ~200; games 15-40). |
width | number | m, 0 … 100 | Length of the crest across its travel (0: an endless line). |
reach | number | m, 10 … 100 | How far it travels (its track is measured against the seabed this far). |
start | number | s, -1 … 36 | Seconds after Play starts before it sets off; -1 waits for water_event start. |
break_ratio | number | 0 … 2 | Breaks when its height passes this share of the depth (0.78 McCowan; 0 never). |
bore_distance | number | m, 1 … 20 | How far a broken wave keeps its height as a bore. |
inland | number | m, 1 … 5000 | How far past the waterline it runs before it dies away. |
foam | number | 0 … 3 | White water on the breaking crest. |
spray | number | 0 … 3 | Spray blown off the breaking crest. |
peel | number | deg, -75 … 75 | Surf: angle between the seabed's depth contours and the crests (0 closes out all along at once; 20-40 peels, the break running along the crest with an open face ahead to ride). |