Thank you!!!!
Oh god
I thought I would go mad.
Thank you for this.
I needed the code to look at.
It works very well
Thanks
I'm having a problem with the vehicles being locked, but I will try to figure it out
I wanted to use bots as boss enemies and let them have vehicles in specific sections.
1. Can I spawn a bot? I'll work out the path stuff, Just bots can drive and attack differently.
2. I was before this using a blank game in Ued with Ash's VDM script from inside the vehicle deathmatch cubemap, but I did not like linking to his package and was trying to incorporate the 2 scripts inside into a separate package as scripts so I could remove the link to his map as a package. The reason I mention this is that Ash's script unlocks the vehicle when a game type is called *xDeathmatch( and you can change that to the SP gametype) but it also calls a second script that gives the deathmatch bots access to the vehicles and the flying nav paths.
If I spawn a bot can it drive and hunt as per the paths it can access?
If not, could someone look at these and see if they can fudge them into the framework and email me how?
I'm sorry. I'm not really a coder. I can load up the source in notepad++ and read through and fudge this and that but I just want this one little thing and I can stop working with the guts and build off a solid base template level where everything works. From that point the core will be left and I can focus on the part I find interesting, making a story driven level.
Before I had read that this allowed vehicles I imported that file and I was able to drive. For some reason as I place the vehicles without this I get a locked vehicle.
Help! Thx!
I KNOW that UDK is better.
But UDK will absolutely not run on a celery 1.4 with 512 g and 64megs of integrated shared video ram.
UT2k4 actually does run, and I needed the bot support.
Does anyone else from the days of quake think that this hundred node shader crap is ridiculous?
texture + normal map + material definition should be all you need.
I saw a udk shader with more than 100 nodes for just this simple water effect. The green slime water in quake 1 worked for me...
Here are the scripts from Ash's vehicle dm mod, which he states we can use so I am:
//---------------------------------------------------
// Vehicle DM Package V1.0 by Ash (A.N.)
// This code fixes Vehicle DM AI and
// enables ONS and AS VehicleFactories.
//---------------------------------------------------
class VDM_AI_Package extends Actor placeable;
var float last_replicated_skins;
function PreBeginPlay()
{
local ASVehicleFactory ASVF;
local ONSVehicleFactory ONSVF;
if(Level.Game != None)
{
log("*** Embedded Vehicle DM Package V1.0 by Ash");
if ((Level.Game.Class == class'CodeBase.SPGame') &&
(!class'CodeBase.SPGame'.default.bAllowVehicles)) ////Sorry, this was my work copy, it should read xDeathmatch on this line
Level.Game.bAllowVehicles = true;
}
foreach DynamicActors( class'ASVehicleFactory', ASVF )
{
if(ASVF == None) continue;
ASVF.VehicleTeam = 255;
ASVF.bVehicleTeamLock = false;
ASVF.bEnter_TeamUnlocks = true;
}
foreach DynamicActors( class'ONSVehicleFactory', ONSVF )
{
if(ONSVF == None) continue;
ONSVF.Activate(0);
}
SetTimer(0.23, true);
}
function Timer()
{
local Vehicle V;
local ONSVehicle ONS_V;
if(Level.Game != None)
{
Level.Game.bAllowVehicles = true;
for ( V=Level.Game.VehicleList; V!=None; V=V.NextVehicle )
{
if(V.Controller != None) continue;
V.bTeamLocked = false;
if((V.Team != 255) && V.IsVehicleEmpty())
V.SetTeamNum(255);
}
if(Level.TimeSeconds - last_replicated_skins >= 2)
{
last_replicated_skins = Level.TimeSeconds;
for ( V=Level.Game.VehicleList; V!=None; V=V.NextVehicle )
{
if((V.Team != 255) || (V.RepSkin != None)) continue;
ONS_V = ONSVehicle(V);
if((ONS_V != None) && (ONS_V.PassengerWeapons.Length > 0) &&
(ONS_V.RedSkin != None))
{
ONS_V.RepSkin = ONS_V.RedSkin;
}
}
}
}
}
defaultproperties
{
}
and the bot AI class extension to activate bot pathing in vehicles:
//------------------------------------------------------------------------------
// Vehicle DM Package V1.0 by Ash (A.N.)
// Existing code for Unreal ® Tournament 2004 Copyright © 2004 Epic Games, Inc.
//------------------------------------------------------------------------------
class VDM_My_DMSquad extends DMSquad;
function bool CheckVehicle(Bot B)
{
local Actor BestPath, BestEntry;
local Vehicle V2, V;
local float NewDist, BestDist, NewRating, BestRating, BaseRadius;
if ( (Vehicle(B.Pawn) == None) && (Vehicle(B.RouteGoal) != None) && (NavigationPoint(B.Movetarget) != None) )
{
if ( VSize(B.Pawn.Location - B.RouteGoal.Location) < B.Pawn.CollisionRadius + Vehicle(B.RouteGoal).EntryRadius * 1.5 )
B.MoveTarget = B.RouteGoal;
}
if ( (Vehicle(B.Pawn) == None) && (Vehicle(B.MoveTarget) != None) )
{
V = Vehicle(B.MoveTarget).FindEntryVehicle(B.Pawn);
if ( V != None )
{
if ( V.GetVehicleBase() != None ) BaseRadius = V.GetVehicleBase().CollisionRadius;
else BaseRadius = V.CollisionRadius;
if ( VSize(B.Pawn.Location - V.Location) < B.Pawn.CollisionRadius + BaseRadius + V.EntryRadius )
{
V.UsedBy(B.Pawn);
if ( Vehicle(B.Pawn) != None )
BotEnteredVehicle(B);
return false;
}
}
}
if ( B.LastSearchTime == Level.TimeSeconds ) return false;
if ( Vehicle(B.Pawn) != None )
{
if ( !NeverBail(B.Pawn) )
{
if ( Vehicle(B.Pawn).StuckCount > 3 )
{
// vehicle is stuck
Vehicle(B.Pawn).VehicleLostTime = Level.TimeSeconds + 20;
Vehicle(B.Pawn).KDriverLeave(false);
return false;
}
else if ( (B.Pawn.Health < B.Pawn.HealthMax*0.125) && !B.Pawn.bStationary && (B.Skill + B.Tactics > 4 + 7 * FRand()) )
{
//about to blow up, bail
Vehicle(B.Pawn).VehicleLostTime = Level.TimeSeconds + 10;
Vehicle(B.Pawn).KDriverLeave(false);
return false;
}
}
if (!B.Pawn.bStationary) return CheckSpecialVehicleObjectives(B);
return false;
}
if (SpecialVehicleObjective(B.RouteGoal) != None && CheckSpecialVehicleObjectives(B))
return true;
BestDist = MaxVehicleDist(B.Pawn);
if ( (Vehicle(B.RouteGoal) != None) && !Vehicle(B.RouteGoal).Occupied() && Vehicle(B.RouteGoal).IndependentVehicle() )
V2 = vehicle(B.RouteGoal);
// look for nearby vehicle
if ( V2 == None )
{
for ( V=Level.Game.VehicleList; V!=None; V=V.NextVehicle )
{
NewDist = VSize(B.Pawn.Location - V.Location);
if (NewDist < BestDist)
{
NewRating = VehicleDesireability(V, B);
if (NewRating > 0)
{
NewRating += BestDist / NewDist * 0.01;
if ( (NewRating > BestRating) && ( V.bTeamLocked || V.bKeyVehicle ||
V.FastTrace(V.Location, B.Pawn.Location + B.Pawn.CollisionHeight * vect(0,0,1)) ) )
{
V2 = V;
BestRating = NewRating;
}
}
}
}
}
if ( V2 == None ) return false;
BestEntry = V2.GetMoveTargetFor(B.Pawn);
if ( B.Pawn.ReachedDestination(BestEntry) )
{
V2.UsedBy(B.Pawn);
return false;
}
if ( B.ActorReachable(BestEntry) )
{
B.RouteGoal = V2;
B.MoveTarget = BestEntry;
V2.SetReservation(B);
B.GoalString = "Go to vehicle 1 "$BestEntry;
B.SetAttractionState();
return true;
}
BestPath = B.FindPathToward(BestEntry,B.Pawn.bCanPickupInventory);
if ( BestPath != None )
{
B.RouteGoal = V2;
V2.SetReservation(B);
B.MoveTarget = BestPath;
B.GoalString = "Go to vehicle 2 "$BestPath;
B.SetAttractionState();
return true;
}
if ( (VSize(BestEntry.Location - B.Pawn.Location) < 1200)
&& B.LineOfSightTo(BestEntry) )
{
B.RouteGoal = V2;
V2.SetReservation(B);
B.MoveTarget = BestEntry;
B.GoalString = "Go to vehicle 3 "$BestEntry;
B.SetAttractionState();
return true;
}
return false;
}
//return a value indicating how useful this vehicle is to the bot
function float VehicleDesireability(Vehicle V, Bot B)
{
local Vehicle V2;
if(V == None) return 0;
if((V.IsA('ONSWeaponPawn')) && (ONSWeaponPawn(V).VehicleBase != None))
V2 = ONSWeaponPawn(V).VehicleBase;
else V2 = V;
if(V2.Occupied() || V2.HasOccupiedTurret()) return 0;
if (V.Health < V.HealthMax * 0.125 && B.Enemy != None && B.EnemyVisible())
return 0;
V.TeamUseTime = 0;
V.PlayerStartTime = 0;
return V.BotDesireability(self, 255, None);
}
function bool AssignSquadResponsibility(Bot B)
{
if (CheckVehicle(B)) return true;
return super.AssignSquadResponsibility(B);
}
defaultproperties
{
}
Thank you to everyone who worked on the SP Framework, it is really a great tool, I am surprised there are not more sp mods
but I guess people have gone to UDK
My reasoning is
more than half the world is still on ancient hardware
This works on my rig
and there are so many games that work using less than what we have here
I just started system shock 2 again, now that it can have graphical upgrades with the newdark engine,
look at what at what people made with that horrible editor, a game that we replay because hunting down a new maintenance tool to fix our only working gun was actually fun.
Nobody has yet made an open source or source accessible inventory game for fps since system shock, other than powerhouse gpu hungry stuff like skyrim. At 500 megs System Shock 2 had an inventory. UDK Scaleform UI's are slow and sucky.
I am rambling, yes, but think of what people would create if you gave them a really simple inventory with combine-able items.
We could be gods...er...happy geeks.
Ahh. Well. Could someone give me a heads up as to how I could make ALL the huds go away for my SP game? Plz?
Not in my install settings, but in the level settings somehow, can I turn it all of? All of it? Other than messages.
Sorry. Big wish list at the end. Thank you all for the tools in this SP Framework.