Neutral Unit Question (Medic)

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
SpartanA259
Captain
Captain
Posts: 498
Joined: Tue Jul 19, 2011 2:47 pm
Projects :: Orion City
xbox live or psn: Steam: [404] Ash
Location: New Reno, Nevada

Neutral Unit Question (Medic)

Post by SpartanA259 »

Hey guys I've been wondering if there is any way to make a neutral unit for each team. To try and rephrase that a little better I want to make a medic class for each team and when you play as the medic class nobody will shoot you or kill you. I've tried searching but I dont really know what to search for and I dont even know if this is possible.
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: Neutral Unit Question (Medic)

Post by kinetosimpetus »

You could try setting a local team as friend to both teams and when a medic spawns, move them to that team. This would all be done in the lua.
User avatar
yuke5
Field Commander
Field Commander
Posts: 945
Joined: Wed Jun 29, 2011 10:42 pm
Games I'm Playing :: SWBF2 TF2 RC KOTOR
xbox live or psn: My steam is yuke5.
Location: Vermont

Re: Neutral Unit Question (Medic)

Post by yuke5 »

@ kinetosimpetus

Would that work though? What if the player wants to be a Medic? I think the games crashes. However, I'm not nearly as experienced as kinetosimpetus. If his idea doesn't work, you could do this.

There could be two local teams of medics though. One local team (local team 1) is friends with team 1 but is enemies with team 2. However, team 2 thinks it's friends with local team 1. Do the same for another local team except that it hates team 1, loves team 2, and team 1 loves it. The downside is that the player couldn't spawn as the medic. The downside is that the player could not spawn as a medic, however, there would be medics on the field helping out both teams.
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: Neutral Unit Question (Medic)

Post by kinetosimpetus »

I haven't tried it, but what I remember from other topics is it will work, and on re-spawning the player would again be on the correct team. Has to be tried though.

As for the team alliances, he wants all medics to be friendly with everyone so they don't get shot at. If the medics were on another team, but had the same alliances, there would be no point.
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: Neutral Unit Question (Medic)

Post by Tears2Roses »

[offtopic]
yuke5 wrote: ...
The downside is that the player couldn't spawn as the medic. The downside is that the player could not spawn as a medic
...
One local team (local team 1) is friends with team 1 but is enemies with team 2. However, team 2 thinks it's friends with local team 1. Do the same for another local team except that it hates team 1, loves team 2, and team 1 loves it.
...
Hidden/Spoiler:
you typed The downside is that the player could not spawn as a/the medic twice :wink: and the thing about teams makes no sense...you can set the locals to be friends with team1 and team2 (and everyone else for that matter) and vice-versa
[/offtopic]
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Neutral Unit Question (Medic)

Post by [RDH]Zerted »

kinetosimpetus wrote:You could try setting a local team as friend to both teams and when a medic spawns, move them to that team. This would all be done in the lua.
Correct. Add your medic unit as normal to teams 1 and 2. Setup a local 3rd team that's a friend (or you can use neutral) of both teams 1 and 2. Make sure teams 1 and 2 are also a friend/neutral towards team 3. Now when a unit of the medic class spawns, Use SetObjectProperty() to change "Team" and "PerceivedTeam" 3. That will effectivly move the unit on onto local team 3.

I would recommend preventing team 3 from being able to capture CPs. If not, you'll have to deal with when all the CPs are captured by team 3 and no human players can spawn.
Post Reply