Neutral Unit Question (Medic)
Moderator: Moderators
- SpartanA259
- 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)
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

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Neutral Unit Question (Medic)
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.
- yuke5
- Field Commander

- Posts: 945
- Joined: Wed Jun 29, 2011 10:42 pm
- xbox live or psn: My steam is yuke5.
- Location: Vermont
Re: Neutral Unit Question (Medic)
@ 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.
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

- Posts: 2381
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
Re: Neutral Unit Question (Medic)
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.
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.
- Tears2Roses
- Chief Warrant Officer

- Posts: 336
- Joined: Thu Jul 07, 2011 9:20 am
- Projects :: Oh some random stuff who knows
- xbox live or psn: PC beats xbox.
Re: Neutral Unit Question (Medic)
[offtopic][/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:
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Neutral Unit Question (Medic)
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.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.
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.
