Bot Weapon Change -1 reply

  • 1
  • 2

Please wait...

wolvesgoalie

Ich Bin Das Auto

50 XP

17th May 2006

0 Uploads

1,393 Posts

0 Threads

#1 11 years ago

Does anybody know how to change the weapons that the AI uses in sp?




Guest

I didn't make it!

0 XP

 
#2 11 years ago

aitype folder?

in iwd. files




Tally

COD Über Support

50 XP

20th November 2004

0 Uploads

3,439 Posts

0 Threads

#3 11 years ago

There several methods to accomplish this:

entity giveWeapon("weaponname"); entity switchToWeapon("weaponname");

(these 2 go together - the first gives the weapon, the second changes the weapon)

If the bot has a name (like McGregor for example):

level.McGregor = giveWeapon("weapon of your choice");

level.McGregor_character_weapons[0] = "xmodel/weapon_thompson"; level.McGregor_character_weapons[1] = "xmodel/weapon_m1garand"; level.McGregor_character_weapons[2] = "xmodel/weapon_m1carbine"; level.McGregor_character_weapons[3] = "xmodel/weapon_bar";

etc.




wolvesgoalie

Ich Bin Das Auto

50 XP

17th May 2006

0 Uploads

1,393 Posts

0 Threads

#4 11 years ago

ok that I can use. I was planning to change the african thomson to a sten. also does the game allow me to make my own ai type, for example m3 grease gun for normandy? If so how do I put those ai into a level?




Guest

I didn't make it!

0 XP

 
#5 11 years ago

it is possible..




Tally

COD Über Support

50 XP

20th November 2004

0 Uploads

3,439 Posts

0 Threads

#6 11 years ago

Im confused by what you mean by "ai type". Could you elaborate a little?




wolvesgoalie

Ich Bin Das Auto

50 XP

17th May 2006

0 Uploads

1,393 Posts

0 Threads

#7 11 years ago

Ai type as in a new ai character that I can load into a level, and be running around with the gun, and specs that I chose, without having to replace an existing one.




Tally

COD Über Support

50 XP

20th November 2004

0 Uploads

3,439 Posts

0 Threads

#8 11 years ago

you can assign almost anything to an entity (an AI actor is a level entity). So, you can give a russian AI actor a greasegun, or a german actor a ppsh. Its up to you in that respect. Just precache it for that level, and issue the right commands.




L!ght str!keR

Stormcaller

50 XP

15th August 2006

0 Uploads

32 Posts

0 Threads

#9 11 years ago

is shotgun possible in SP? edited misstype




Tally

COD Über Support

50 XP

20th November 2004

0 Uploads

3,439 Posts

0 Threads

#10 11 years ago

yep. But you would have to create a SP weapon. Just copy the shotgun_mp, and edit the name to shotgun. Put it in a nested folder structure weapons\sp\

Then, to get it into a level, you could put something like this:

level.player giveweapon ("shotgun"); shotgun_ammo = 5; slot1 = level.player getweaponslotweapon("primary"); slot2 = level.player getweaponslotweapon("primaryb"); if (slot1 == "shotgun") { level.player setweaponslotammo("primary", shotgun_ammo - 5); level.player setweaponslotclipammo("primary", shotgun_ammo); } else if (slot2 == "shotgun") { level.player setweaponslotammo("primaryb", shotgun_ammo - 5); level.player setweaponslotclipammo("primaryb", shotgun_ammo); } level.player giveweapon ("thompson"); level.player switchtoweapon("shotgun");

that way, if you pick up a shotgun after a bot has been killed, you get full ammo.




  • 1
  • 2