Teleporter type stuff - Routes buggers

Get some cool tips about how to tweak your UT graphic, gameplay, and much more!
Post Reply
User avatar
sektor2111
Godlike
Posts: 6412
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Teleporter type stuff - Routes buggers

Post by sektor2111 »

Audience: Bot fans who want to find out what a Teleporter does to A.I. pawn when Pawn doesn't want to Teleport - Bad Teleporter Placement - The worst scenario.

Bug is coming from DevPath - unchanged in 2022. In order to except me from writing X pages with explanations, I'll sample here TWO bugged demo "maps" which are pointing what is happening when a Teleporter (or a swJumpPad) is placed like a cow in the middle of street making Bot to act like is poisoned with potion of stupidity. In the most of cases, when map is full of paths, Bot can resume navigation after such a sudden route change, but this doesn't means that it's all normal - it's not. Let's see the stage when there aren't more options.
CTF_JumpyMorons.PNG
These are said demos where you can spectate 4-6 Bots. By using such Teleporters placement it's not like here is a normal CTFGame.
CTF-JumpyMorons_BugDemo.7z
(17.09 KiB) Downloaded 11 times
Here you can delete paths (Paths Undefine) and replace Teleporters from main ground with plain PathNodes. After rebuilding paths you will see the CTFGame - and yes HealthVial from the middle spot is part of Navigation doesn't matter if anybody took it or not.

As a tech note, in XC_PathWorker such a One-Way Teleporter placed like this won't do anything - paths forced by stock DevPath through such a node are 99% useless because Pawn is hijacked from its calculated route elsewhere and so we don't need more outgoing Paths from a Teleporter which is One-Way - One Way means ONE WAY and not More Ways. The only benefit here is delivered by FV_LinkedPoint which is a blind Teleporter only for causing connections and which is not damaging configured route as long as it won't Drop/Teleport Pawn anywhere. Actually Teleporter won't be loaded with a single path to destination, but it will have other outgoing paths going elsewhere not really used, but created out of a navigation logic. A Destination Teleporter has no issues here - it will need outgoing paths and/or incoming Paths because... it can substitute a plain PathNode with success as long as it won't move Pawn anywhere.

Edit: Stock samples about Teleporters placement and their usage are in CTF-Face][, AS-Rook. A.I. Pawn should move there only if it wants to Teleport or to Jump and nothing similar to a PathNode. In other hand, a dumb Teleporter can annoy human player as well - perhaps I won't sample such a stage because lolzers will do such "maps" wondering later why they won't be used/voted.
Buggie
Godlike
Posts: 2747
Joined: Sat Mar 21, 2020 5:32 am

Re: Teleporter type stuff - Routes buggers

Post by Buggie »

Teleport can be Disabled. If it disabled, outgoing paths is valid. So it is more like usage path issue, rather of problem of built paths. If point do special handling and search way code want use it as intermediate point, it must ensure special handling return same point as original.
User avatar
sektor2111
Godlike
Posts: 6412
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Teleporter type stuff - Routes buggers

Post by sektor2111 »

I can recreate another stage with a disabled Teleporter and there you will figure some stuff like in original SkaarjTower map and solved by Higor where SpecialHandling will ruin everyone's happiness in seconds... except customized Teleporters capable to react only concerning Teleporting, code would be a bit complex here... But original is here...

Code: Select all

function Actor SpecialHandling(Pawn Other)
{
	local int i;
	local vector Dist2D;
	if ( bEnabled && (Other.RouteCache[1] != None)
		&& Other.RouteCache[1].IsA('Teleporter') && (string(Other.RouteCache[1].tag)~=URL) )
	{
		if ( Abs(Location.Z - Other.Location.Z) < CollisionHeight + Other.CollisionHeight )
		{
			Dist2D = Location - Other.Location;
			Dist2D.Z = 0;
			if ( VSize(Dist2D) < CollisionRadius + Other.CollisionRadius )
				Touch(Other);
		}	
		return self;
	}

	if (TriggerActor == None)
	{
		FindTriggerActor();
		if (TriggerActor == None)
			return None;
	}

	if ( (TriggerActor2 != None) 
		&& (VSize(TriggerActor2.Location - Other.Location) < VSize(TriggerActor.Location - Other.Location)) )
		return TriggerActor2;
					
	return TriggerActor;			
}
With other words, Bot will attempt to trigger Teleporter. If this doesn't exist or is elsewhere, Bot will react in two ways:
- running to some wall trying to trigger Teleporter;
- wandering around if SpecialHandling returns None.
Result: Moving through this point might fail, and also if Bot wants to use Teleporter for another destination. As completion you can track forum for complains about Teleporters with Newnet and TeleporterFixXXX which are disabling Teleporters ("Replacing them") and then... results were already pointed over topics...

SpecialHandling stuff might be simple or complex depending on how user understands how does it work. I used such thing to deviate Pawn in certain condition and allowing it only if route is safe. Example (I don't recall the name but let's say it's a FearNode) A FearNode can deviate Pawn elsewhere including to a previous point when a Projectile is flying in certain Range for avoiding damage as much as possible - if No projectile is flying around, Node will point Pawn to itself or to something concerning a mission Actor placed around.

Another stage is with a mobile bridge - routing Pawn around until bridge is back and then allow it to pass, this way making Pawn to figure How to deal with said "Bridge".
Post Reply