Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 76 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Tutorials

»
CoD2 Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
AI deploy an mg
Versions: You must be logged in to view history.
Gamalucker shows us how to get an AI to deploy an mg
This time i want AI running to a position and deploy its MG.

Note: This tutorial only uses the editor, gsc scripting is not needed


The best way to learn this is looking in the sample files. But i will describe some functions here.


At first i want a German Soldier that runs around a corner and places his Mg42 on the Ground.

Thats how the AI should look like:

"target" "mgpath1"
"targetname" "pf17369_auto194"
"angles" "0 270 0"
"origin" "-520 1064 32"
"spawnflags" "0"


"script_ignoreme" "0" // When you use script_ignoreme 1 this soldier won't be attacked by enemies

"script_grenades" "0" // We don't want him to stop using his mg just to throw a grenade

"script_startinghealth" "250" // More health than an ordinary soldier has

"script_noteworthy" "mg42gunner"
"export" "49"
"model" "xmodel/character_german_normandy_thin"
"classname" "actor_axis_nrmdy_wehr_reg_mg42portable"


Than just a simple pathnode...


"origin" "-312 1088 48"
"target" "mgpath2"
"radius" "89.261658"
"targetname" "mgpath1"
"classname" "node_pathnode"



...that is connected with the position were i want him to place his MG.


"maxrange" "1745" // The range how far the Soldier can shoot
"classname" "misc_turret"
"targetname" "mgpath2"

"weaponinfo" "mg42_bipod_prone" // I want him to prone on the ground, you can also use stand and duck
"model" "xmodel/weapon_mg42"
"angles" "0 270 0"
"origin" "184 1008 15"



There are a few more commands that can be used here:

QUOTE
leftarc - horizonal left fire arc.

rightarc - horizonal left fire arc.

toparc - vertical top fire arc.

bottomarc - vertical bottom fire arc.

yawconvergencetime - time (in seconds) to converge horizontally to target.

pitchconvergencetime - time (in seconds) to converge vertically to target.

suppressionTime - time (in seconds) that the turret will suppress a target hidden behind cover

maxrange - maximum firing/sight range.

aiSpread - spread of the bullets out of the muzzle in degrees when used by the AI

playerSpread - spread of the bullets out of the muzzle in degrees when used by the player



Now we have a german Soldier that will run to this location, deploy his mg and starts attacking us.


Than i did the same with an american soldier, but i want him to shoot at a defined position.

For this i used script_manualtarget "1" at his misc_turret and linked it to a script_origin.

"target" "30caltarget"
"rightarc" "90"
"leftarc" "90"
"maxrange" "1745"
"classname" "misc_turret"
"targetname" "pf17369_auto2040"
"weaponinfo" "30cal_stand"
"model" "xmodel/weapon_30cal"
"angles" "0 90 0"
"origin" "24 280 55"
"script_manualtarget" "1"



and the origin:


"origin" "56 1040 96"
"targetname" "30caltarget"
"classname" "script_origin"



Now he only shoots at this origin.


mg.zip

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»