Turret team changer weapon

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Turret team changer weapon

Post by Dakota »

ok i want to make a weapon that changes the team of turrets only.

example: some enemy places an auto turret and then you walk up to it and use the weapon and it makes the turret go to your team.

it would also work on turrets around the map that are on no one's team but i will set them up in the lua to vehicleself. this could also work on turrets that are dispensed that are vehicleself that turn to team 0 when you get out.

i need to know what i would have to do to set up a weapon like this. i also need to know what i would do if it was an era mod, would i be able to do it still and would i just type in into each LUA?
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: turret team changer weapon

Post by DarthD.U.C.K. »

i think you should use onobjectdamage, then check if the object is a turret, then check the weapon with getlasthitweaponclass and finally look on which team it is and on which team the damager is. if everything fits, change the object team.
and yes, you have to put this in ever lua in order to make it work in that mission
Post Reply