RouteCache heh

Discussions about Coding and Scripting
Post Reply
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

RouteCache heh

Post by sektor2111 »

I was busy with doing paths in some Level (later about this). While Bots were not so skilled toward a lift button I wrote another LiftExit trying to get everything that can move a lift, even another mover as button. Result was not only as expected in big parts but even me I was able to figure some routecache pointing button right in area from front of lift. So these Navigation routes can be even another actors than NavigationPoints in specialhandling conditions :mrgreen: ,I gotta admit I was a bit shocked while red marker RouteCache(0) was exactly moved over that button. Also the good thing, button is not in direct line with lift but a bit away, not that reachable directly.
Snippet here

Code: Select all

var() name LiftButton;
var Actor Button;

function PostBeginPlay()
{
	local Actor AButton;

	Super.PostBeginPlay();
	if ( LiftButton != '' )
	{
		foreach AllActors ( class 'Actor', AButton, LiftButton )
		{
			Button = AButton;
			break;
		}
	}
}

function Actor SpecialHandling(Pawn Other)
{
	if ( (Other.Base == MyLift) && (MyLift != None) )
	{
		if ( (self.Location.Z < Other.Location.Z )
			 && Other.LineOfSightTo(self) )
			return self;
	}
//Not coming from lift but want to the lift direction which is in pause
	if ( MyLift != None && !MyLift.bOpening && !MyLift.bDelaying && Button != None )
	{
		Other.MoveTarget = Button;
		return Button;
	}
	else
		return Super.SpecialHandling(Other);
	return Self;
}
First time I was afraid of a nice crash but no, it did not crash it's logic after all...

All right, back to the lab, I have to see Bots able to hunt in all areas.
Edit: Ok, I think I can explain where this thing was needed.
Last MH tutorial written, did trigger me to look at some "high-tech" Level called Tarmation2 a sort of "Moph-to-MH" thing which I could see badly messed up starting with geometry.
By looking back at forums I was almost to believe that fixing geometry there is not that possible since "mappers" claimed that they couldn't not do too much fix over there.
Version "_fix5" was impressive at the way of doing fixes... :lol2: .
TranslatorEvent ? I can setup simple triggers reacting according to map mission rather than static the same dumb sentence... and working directly on Screen :P .
Actually I cannot say that it's perfect now, but not how it was the mess which was shared so far.
Area with Brutes has now "floor", CubeBox hosting a Titan which was going out too early did not include a collision - yeah, a stupid mover box was just trash. Floor was fixable by simply aligning to grid the whole space and rotating the brush causing an ugly BSP cut around, and now it's nice. I gotta admit using rotations is a very very heavy process - you need 30 years of schools for doing this :loool: .
I'm gonna add partial Bot support (I'm not gonna teach them that Elevator) if player is attacking and moving stuff around, Bot will use that "Shortcut Lift" (it's Teleporter ShortCut not Lift after all) to get into battle.
Speaking about difficulty - perhaps I have to write a "patching" module for "fixing difficulty" accordingly. Admins with super super players can load a package for increasing monsters number and changing default difficulty using this way. Admins with less player can use it in original. I'll think about these... Or I might be willing to setup an INI file for this map and letting everyone to experiment nasty/cute things.
Post Reply