AI Bots that can fire AA guns.

Please use this forum to ask all your MoHAA Bots questions / discussions

Moderator: Moderators

Post Reply
User avatar
StarGeneral
Sergeant
Posts: 67
Joined: Wed Oct 17, 2007 5:21 am

AI Bots that can fire AA guns.

Post by StarGeneral »

Okay, this may seem a bit far-fetched but heres the deal.
I want to know if it would be possible to script a bot that goes and controls and AA gun (walks to it, gets in it and fire it at targets.)

I've seen the bots do it in Spearhead, but I want them to fire the AA guns at people and other bots...is this possible?

Ps: I have had absolutely NO luck with even making a bot walk around Im just asking if its possible, not for instructions. If its possible i will ask for instructions ltr.
"Si vis pacem, para bellum."
"If you want peace, prepare for war."
User avatar
LilChefDeath
Corporal
Posts: 36
Joined: Sun Nov 26, 2006 7:48 am

Post by LilChefDeath »

lol well if you've seen it in spearhead then they obivously can :P

And yes it is possible.you just need to give the bots coords on to where the AA gun is and you would need to "make" or "find" a script that allows them to shoot the gun..



LilChefDeath
Image

Code: Select all

 local.player uhh_whatNow?" 
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Pak0.pk3 \models\human\animation\scripted\flak88_animation

Code: Select all

animations 
{
	$path models/human/animation

	//----------
	//flak88 animations
	//----------

	// Used in m1l2 

	88officer_fire			scripted/flak88/offic_fire.skc
	88operator_idle			scripted/flak88/oper_idle_onwheel.skc
	88operator_takecover	scripted/flak88/oper_takecover.skc
	88operator_turnleft		scripted/flak88/oper_turnleft.skc
	88operator_turnright	scripted/flak88/oper_turnright.skc
	88operator_turnright	scripted/flak88/oper_turnright.skc
	88officer_idle			scripted/flak88/offic_idle.skc
	88officer_coverears		scripted/flak88/offic_coverears.skc
	88operator_twitch		scripted/flak88/oper_idle.skc
}
Image
User avatar
StarGeneral
Sergeant
Posts: 67
Joined: Wed Oct 17, 2007 5:21 am

Post by StarGeneral »

no no bodger, you misunderstood, when I said AA guns, I didnt mean flak guns, I meant the four-barreled machine guns on the first level in spearhead shooting at paratroopers.
"Si vis pacem, para bellum."
"If you want peace, prepare for war."
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

My SH does not work at the moment bad Nvidia drivers but I would say that it they do it in SH then it should be possible . You will have to enable the ai animations by editing the new_generic_human.tik in SH but it won't be a serverside mod . Have a look at the pak1.pk3->gags->T1L2_Flakk88.scr it is mission 1 that you are talking about right .

Code: Select all

//-------------------------------------------------------------------
DoFlak88Guys:
//
//		Sets up and gets the guys visually firing the flak88...
//-------------------------------------------------------------------

	$FlakGerman4 ai_on
	$FlakGerman5 ai_on
	$FlakGerman6 ai_on

	$FlakGerman4.no_idle = 1
	$FlakGerman5.no_idle = 1
	$FlakGerman6.no_idle = 1

	$FlakGerman4.FlakLoad			= 12G101_FlakLoad1
	$FlakGerman4.FlakLoad2Cover		= 12G102_FlakLoad2Cover
	$FlakGerman4.FlakCover			= 12G103_FlakCover
	$FlakGerman4.FlakCover2Load		= 12G104_FlakCover2Load

	$FlakGerman5.FlakLoad			= 12G201_FlakLoad2
	$FlakGerman5.FlakLoad2Cover		= 12G202_FlakLoad2Cover
	$FlakGerman5.FlakCover			= 12G203_FlakCover
	$FlakGerman5.FlakCover2Load		= 12G204_FlakCover2Load

	$FlakGerman4.angles = "0 -90 0"
	$FlakGerman5.angles = "0 180 0"
	$FlakGerman6.angles = "0 180 0"

	$FlakGerman4.origin = $Flak88B gettagposition "passenger2"
	$FlakGerman5.origin = $Flak88B gettagposition "passenger1"
	$FlakGerman6.origin = $Flak88B gettagposition "passenger3"

	$FlakGerman5.origin = ( $FlakGerman5.origin + (20 50 0) )

//	$FlakGerman4 attach $Flak88B passenger1 0 ( 0 0 0 )
//	$FlakGerman5 attach $Flak88B passenger2 0 ( 0 0 0 )
//	$FlakGerman6 attach $Flak88B passenger3 0 ( 0 0 0 )


	$FlakGerman4 thread DoFlakGuy 1
	$FlakGerman5 thread DoFlakGuy 0

	// #6 is the officer...
	$FlakGerman6 thread DoFlakOfficer

	$FlakGerman4 thread CancelGagWait
	$FlakGerman5 thread CancelGagWait
	$FlakGerman6 thread CancelGagWait

	// captain will update this after he says his shiznit...
	$FlakGerman4 nodamage
	$FlakGerman5 nodamage
	$FlakGerman6 nodamage

	// disable their ai until ready for the gag...
	$FlakGerman4 exec global/disable_ai.scr
	$FlakGerman5 exec global/disable_ai.scr
	$FlakGerman6 exec global/disable_ai.scr

	$FlakGerman4 hearing 1
	$FlakGerman5 hearing 1
	$FlakGerman6 hearing 1
	
	$FlakGerman4 sight 1
	$FlakGerman5 sight 1
	$FlakGerman6 sight 1



	End 
Image
Cobra {sfx}
First Lieutenant
Posts: 193
Joined: Tue Mar 23, 2004 10:25 pm
Contact:

Post by Cobra {sfx} »

The Flak guns in T1L1 are script controlled not AI, they just attached an actor to it to make it look good and gave the gun set targets in the sky to fire at.

You could setaimtarget $player to target players via script and the bot will just look like its him doing it - or add a script that targets players for a while and switch to targetnames bots etc etc.

Look thru the T1L1 script files theres some good info in there you will be needing ;)


Bd - theres a link on mRU for fixing the SH/BT problem when installing a new nvidia card - it got mine working again :)
MRU Webmaster
Post Reply