Sperry on 25/10/2020 at 15:20
The title says it all. Has anyone figured out how to change a flow group or it's properties in game?
Ex: water flows from north to south at high speed until the player hits a switch closing a gate, which stops the flow or inverses it.
I'm wondering if this can be modified in-game, with the help of S&Rs or Metaprops, by substituting one flow group with another. Could it be possible to swap two different flow groups by teleporting them? I'm particularly intrigued by the "used" checkbox in the flow "edit group" menu (what's its purpose?). Also, what does the "FlowContact" link flavour do?
nicked on 26/10/2020 at 08:28
I can't say I've ever tried this but I would suspect you can't do any dynamic modification of flow brushes, because the flow brushes themselves essentially aren't used in the game, they merely tell the water brushes what to do during portalisation (someone correct me if I'm wrong). You would probably need entirely fake water, a la Temple of the Tides or What Lies Below.
Yandros on 26/10/2020 at 12:21
I agree, and furthermore the fake water in WLB is smoke and mirrors with respect to its level and flow direction, if you're looking for an actual current which moves the player then I don't know of a way to change that dynamically, and suspect it is not possible.
trefoilknot on 26/10/2020 at 14:44
You might be able to simulate the effect, if you only want the player to experience the current. You could have a trapmoverelative fnord send continuous impulses (e.g., every couple ms) which nudge the player very slightly. If it turns on when the player is in the water (e.g., using a TrigRoomPlayer room), I think this could be a pretty close approximation. Then simply have different fnords which nudge in different directions, as needed.
nicked on 27/10/2020 at 07:28
An unrendered conveyor might do it if the water is shallow enough.
GORT on 27/10/2020 at 10:32
Hmmm... Out of curiosity, could there be a way to edit the flow group's settings on the fly by the use of a squirrel script?
I haven't had a chance to learn squirrel scripting yet. :tsktsk:
Daraan on 27/10/2020 at 13:45
TL;DR:
Can we access / change flow groups: No.
Can we fake it? Yes.Quote Posted by Sperry
Has anyone figured out how to change a flow group or it's properties in game?
Quote Posted by GORT
Out of curiosity, could there be a way to edit the flow group's settings on the fly by the use of a squirrel script?
Quote Posted by nicked
you can't do any dynamic modification of flow brushes, because the flow brushes themselves essentially aren't used in the game, they merely tell the water brushes what to do during portalisation (someone correct me if I'm wrong)
It's basically as nicked said, flow brushes are used in the editor. The motion data is written into (Portal)Cells.
Even if we could determine the cells there is no way to access or modify them. => not possible with the tools at our disposal. Maybe theoretically with an interface like SetWeather.
Quote:
I'm particularly intrigued by the "used" checkbox in the flow "edit group"
If unchecked the water will not move
visually. While this is a factor that is evaluated ingame. Any maybe maybe could lead to changing the visual flow. There is again no way to access it and it does not affect the players motion.
Quote:
Also, what does the "FlowContact" link flavour do?
The S&R system under the hood is based on links. An existing link is basically a "I'm touching you".
The FlowGroup object will send its associated Stimulus to FlowContact linked objects.
-----------------------
How to fake it.As nicked said conveyors can do the trick.
Here you will find everything you need:
(
https://www.ttlg.com/forums/showthread.php?t=142103&p=2319620&viewfull=0)
There are two downloadable files. With multiple mission files. The .cow files are to be preferred.
In the
FakeWaterNewOBB.cow look for example at object 67 for a start. Which combines water with an elevator. And adds the NVMetaTrap2 script later.
With a custom script this would be sooooooo much easier - somewhen....
---
The basic principles are:The players movement can be temporarily adjusted by giving him the
Physics->Model->ConveyorVelocity property.
The same property also also makes a fake water objects texture 'flow'. It must have
Renderer->Bitmap Wordspace and it's
Model->Shape to a water texture like blin.
Now you need to determine when the player is in your special water, like with a RoomBrush or TrigOBB and add the Model->ConveyorVelocityA when your gate is open and Model->ConveyorVelocityB when the gate is closed to the player and a fake water object for the visual stuff.
---
The main problems are:Easy: Giving the water the right property.
Best this is done with MetaProperties when the lever is activated remove the old with ConveyorVelocityA and add another with ConveyorVelocityB via NVMetaTrap.
See the demo how TriggOBB + NVMetaTrap is combined.
Medium: Second giving the player the right one. This is much more complicated without a fitting custom script, with one relatively easy :D
Not sure if NVMetaTrapMeta=$QVar will work. With the QVar initially set the the archetype id with ConveyorVelocityA property and when the lever is pressed you set it to the ID to the MetaProperty with ConveyorVelocityB.
A custom script which reacts to PhysEnter or a RoomScript which sets the correct property should be rather easy and short and you wouldn't need MetaProperties.
---
In the demo there is a version with 3 + 3 gates for inflow and outflow with direction and height changes, it's pretty complex with TrigQVar and RequireAllTraps, while most of it could be copy pasted. dml and .vbr included.
With a custom script it would be waaaaaaay easier and for your situation overkill but hey hey maybe you now want to add more canyons, curves and gates ;)
Sperry on 14/11/2020 at 13:54
Ok thanks for the feedback. This perfectly answers my question. :)