UE3 - UT3 Help with setting bots to go to particular locations

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

wwwRAELorg

Intelligent Design Atheist
Jul 26, 2009
37
0
0
www.rael.org
Hello fellow UT modders/programmers. I'm trying to set up the enemies/monsters to try to capture certain locations that have a specific static mesh actor. This is done on a modified warfare gametype. How can I accomplish this? I've looked over the UTOnslaughtPowernode_Content source code and the parent classes up to the NavigationPoint class but still have no idea how to accomplish this. If this has been addressed in another thread, can you please direct me to that thread? Any help would be appreciated.
 

DannyMeister

UT3 Jailbreak Coder
Dec 11, 2002
1,275
1
38
41
Bolivar, Missouri
How you handle this might depend some on whether these are static points placed by a mapper at design time, or whether they are mobile capture points.

I'd start out by making the actor they should capture a sublcass of UTGameObjective. You can then add the static mesh to its Components array. Having it be a UTGameObjective might be enough to make bots find it interesting. You really ought to tweek the bot behavior in a UTOnslaughtTeamAI subclass. GetPriorityAttackObjectiveFor and GetLeastDefendedObjective are some of the methods that might interest you.
 

DannyMeister

UT3 Jailbreak Coder
Dec 11, 2002
1,275
1
38
41
Bolivar, Missouri
Um, well, have you followed the advice yet? I think if you create an objective class, and give your gametype a custom AI class, you can do this. Head down that path, and if there is any specific problems you run into, it would be easier to help you out then a general "What do I do?"

Good luck!
 

wwwRAELorg

Intelligent Design Atheist
Jul 26, 2009
37
0
0
www.rael.org
How you handle this might depend some on whether these are static points placed by a mapper at design time, or whether they are mobile capture points.

I'd start out by making the actor they should capture a sublcass of UTGameObjective. You can then add the static mesh to its Components array. Having it be a UTGameObjective might be enough to make bots find it interesting. You really ought to tweek the bot behavior in a UTOnslaughtTeamAI subclass. GetPriorityAttackObjectiveFor and GetLeastDefendedObjective are some of the methods that might interest you.

Currently, what I want the bots interested in are static mesh actors that are placed from Kismet by a level designer. I don't know how to code that to be inherited from a UTGameObjective class. Is there something I need to do in Kismet or is there a few lines of code that can do the trick? If it just doing the coding, can you provide a coding example of how to do this? Thank you so far for your help.
 

DannyMeister

UT3 Jailbreak Coder
Dec 11, 2002
1,275
1
38
41
Bolivar, Missouri
Nah, it wouldn't be something you could do from kismet. It would need to be something along these lines:

Code:
class ATR_CapturePointObjective extends UTGameObjective;

var MeshComponent CapturePointMesh;

...

defaultproperties
{
	Begin Object Class=StaticMeshComponent Name=CaptureMesh
		// TODO create and use custom mesh
		StaticMesh           = StaticMesh'GP_Onslaught.Mesh.S_GP_Ons_Power_Node_Base'
		Scale                = 0.5
		CullDistance         = 7000.0
		CachedCullDistance   = 7000.0
		bUseAsOccluder       = False
		CastShadow           = False
		bForceDirectLightMap = True
		bCastDynamicShadow   = False
		LightingChannels     = (BSP=True,Static=True,Dynamic=True)
		CollideActors        = False
		Translation          = (X=0.0,Y=0.0,Z=-60.0)
	End Object
	CapturePointMesh = CaptureMesh
	Components.Add(CaptureMesh)
}

Then you can place the ATR_CapturePointObjective actor in the map and it will show up as the mesh specified in the StaticMesh = StaticMesh'GP_Onslaught.Mesh.S_GP_Ons_Power_Node_Base' line. Change that to whatever mesh you want.
 

wwwRAELorg

Intelligent Design Atheist
Jul 26, 2009
37
0
0
www.rael.org
Nah, it wouldn't be something you could do from kismet. It would need to be something along these lines:

Code:
class ATR_CapturePointObjective extends UTGameObjective;

var MeshComponent CapturePointMesh;

...

defaultproperties
{
	Begin Object Class=StaticMeshComponent Name=CaptureMesh
		// TODO create and use custom mesh
		StaticMesh           = StaticMesh'GP_Onslaught.Mesh.S_GP_Ons_Power_Node_Base'
		Scale                = 0.5
		CullDistance         = 7000.0
		CachedCullDistance   = 7000.0
		bUseAsOccluder       = False
		CastShadow           = False
		bForceDirectLightMap = True
		bCastDynamicShadow   = False
		LightingChannels     = (BSP=True,Static=True,Dynamic=True)
		CollideActors        = False
		Translation          = (X=0.0,Y=0.0,Z=-60.0)
	End Object
	CapturePointMesh = CaptureMesh
	Components.Add(CaptureMesh)
}

Then you can place the ATR_CapturePointObjective actor in the map and it will show up as the mesh specified in the StaticMesh = StaticMesh'GP_Onslaught.Mesh.S_GP_Ons_Power_Node_Base' line. Change that to whatever mesh you want.

OK. I understand how to set up the code, but how do you place the inherited UTGameObjective on the map? Currently, I'm using the Unreal editor and can't find how to set up an objective using that editor.
 

DannyMeister

UT3 Jailbreak Coder
Dec 11, 2002
1,275
1
38
41
Bolivar, Missouri
If you add your package to the ModPackages section of your UTEditor.ini file, then it should show up in the Actor browser for you to place in the map.
 

wwwRAELorg

Intelligent Design Atheist
Jul 26, 2009
37
0
0
www.rael.org
I'm forever grateful for you guys, especially Danny. I have working just fine. Thanks for all your help. And Danny I was wondering, what is Jailbreak? Is it a specific gametype where you have prisoners attempt to escape and guards doing everything to prevent that? I checked out the website but didn't understand what Jailbreak is all about. You can answer whenever. I'm still busy with my school projects.

Adam
 

DannyMeister

UT3 Jailbreak Coder
Dec 11, 2002
1,275
1
38
41
Bolivar, Missouri
Glad it is working!

[offtopic]
Jailbreak is a game type roughly based on team deathmatch. When you die, you are sent to a jail (usually in the enemy base). If one of your team members can fight their way into the enemy base and hit a release switch, then you and the other prisoners on your team are released. If all players on a team are captured, then the team is executed in some creative manner, and the other team gets a point. If you browse around the website some, you'll find more explanation. JB was popular in both UT and UT2004. I'm hoping it will be for UT3 as well. :)
[/offtopic]
 

[H3D]Pendragon

Teammember on UT3JB
Sep 5, 2008
162
0
0
Hedsteem.com
I had my Girl friend ask me what Jail break was, the best and easiest way to explain it is remembering the child's game, "release."

Front porch is team A's base, back porch is team B's base,back yard is team B's you dress in all black and capture each other kinda like freeze tag at night. But when your team is captured you have to go into enemy territory and release them.
 

Forgetful

Here is party?
Sep 21, 2003
427
0
0
Winnipeg, Canada
Visit site
I had my Girl friend ask me what Jail break was, the best and easiest way to explain it is remembering the child's game, "release."
Wow wow. Lets back up the bull **** train here. Your posting that you have a "girlfriend"?? Everyone knows that if you choose the path of a coder the "girlfriend" its never an attainable goal :p

j/k. I'd like to see more of jailbreak as well in UT3