Well, if you want bots to be aware of it and such, any solution revolving only the existing actors the game already provides will be exceedingly complicated to even next to impossible to make it work as perfectly well as you want.
In other words, you probably cannot do this without custom code.
Speaking of which, I do have something in mind, which would just involve a mover and a custom actor to manage all of this.
But this is all very high level and conceptual, right out of my head, so a lot of the code details I am going to talk about may not work as well as in theory, so it's up to anyone willing and up to the task to test it or identify the problems with this approach.
The first thing to keep in mind is that this is actually a rather simple problem, mostly due to the fact that code-wise, all you have to worry about is whether something is in one side of 1 axis or the other, namely all you have to worry about is the Z-axis alone, and how to handle actors whose locations are below a specific Z-axis value (where the lava supposedly is).
It's just a bit worksome because of a fair number of things you have to take into account, especially AI-wise.
So, first off, you need to set up a mover: this mover is solid (not a sheet), although it can be thin (maybe 32uu or wider, doesn't matter much as long as it has collision), and it represents the lava.
With this mover you don't do any special setup, other than the visuals and such, and its initial position, although for it to work best it shouldn't either be very thick or the pivot should reside on the surface of the mover that represents the actual lava surface.
From here, we advance with the actual actor: the idea here is to build a custom actor, something you place in the map (maybe something extending from Info
for example), which simply has a few editable fields specific to the lava: the mover reference or tag that will act as the lava surface and the rate at which it rises.
And then, the real magic will be the code within this custom actor, which will simply need to do the following set of tasks:
- at the start, set the mover automatically so that any touch or bump with it causes an event sent to this actor (maybe by setting BumpEvent, or maybe using some other more elegant solution);
- every tick, move the lava mover up in the Z-axis at the rate that was set;
- upon getting bumped by any actor, apply something equivalent to death to it in the case the actor is "killable" in some sense: kill the Pawn using the Died method, destroy projectiles, etc;
- with a slower timer (maybe called 5x to 10x per second, so set to 0.2 or 0.1 seconds, repeating), check if there's any actor below the mover (using the current mover location Z axis), and "kill" it if applicable;
- for Playerstarts below the lava point, they should be deactivated (bEnabled=False);
- for all NavigationPoints below the lava point (Pathnodes, InventorySpots, etc), they should have their cost greatly increased (ExtraCost += 1000000, idk);
- all Inventory should be destroyed below the lava point as well.
From here, I am not sure if more than this is needed to make the bot to stay the hell out from the lava and take paths away from it.
But if this isn't enough, either by the cost increase not being enough or not being applicable in runtime (the details how it works escape me after so many years), in this actor you may iterate through all the bots and instruct them directly to not take those paths, by spawning "carrots" in from of them to lead them (think BotBurguer kind of thing) or to instill them fear, or anything else, there are plenty of ways to force a bot to do what you want.
And lastly, for the overall experience to be believable, this custom actor could also spawn effects and play sounds during the bumps to make it actually look like they hit lava, as well keep actors with an ambient sound in them near each player (locally in case of online play) to play a lava looping ambient sound.
Furthermore, if you wish the lava to not kill immediately and just apply damage over time, that may be more tricky, but here we can take a page from Fortnite itself (which made this exact mode a while ago), and before they had the support for players to able to "swim", they made the lava to just make the players jump, while taking damage each time they touched the lava.
Feel free to search up videos with something like "Fortnite floor is lava" to see what I mean.