Teamkill script
Moderator: Moderators
-
DrDrSheldonLeeCooper
- Chief Warrant Officer

- Posts: 353
- Joined: Sat Apr 26, 2014 1:50 pm
- Projects :: Times before Empire
- xbox live or psn: No gamertag set
- Location: Coruscant City [Germany]
Teamkill script
Is it possible to make a script that if you attack a team member, that he will
get agressive and attack you? your if you make a teamkill and the other teammebers
want to revenge him? Or isn't that possible to make with the swbf2 al?
get agressive and attack you? your if you make a teamkill and the other teammebers
want to revenge him? Or isn't that possible to make with the swbf2 al?
-
hunpeter12
- Command Sergeant Major

- Posts: 260
- Joined: Mon Apr 18, 2011 2:53 pm
- Projects :: Underground City The Complex [WIP]
Re: Teamkill script
It's possible with some complex LUA scripting, but it would have a lot of problems.
-
Noobasaurus
- Droid Pilot Assassin

- Posts: 2006
- Joined: Tue Aug 17, 2010 5:56 pm
Re: Teamkill script
I wouldn't really say complex. I did something similar using teams in my Kill the Target script. You could probably use that as a base and instead of changing the team of a whole side you instead change the team of one unit and set them to attack you. Most of this stuff you can see in the Kill the Target script. Here's the function you would use when damage is taken:
I forget if that actually changes their team right then and there, but it's worth a try.
Code: Select all
SelectCharacterTeam(character, team)-
hunpeter12
- Command Sergeant Major

- Posts: 260
- Joined: Mon Apr 18, 2011 2:53 pm
- Projects :: Underground City The Complex [WIP]
Re: Teamkill script
Yeah, not really complex, but maybe strange result. If you transfer some units of your team to e.g. team 3 and set team 3 to be enemy with both teams you will have somke units from your team as an enemy for all the mission (unless you use a timer or something), just because you accidentally grenaded a team member of yours. So I don't know if it would be fun.
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
Re: Teamkill script
It's late and I just got off work so I could be way off here, but I think noobasaurus is saying that you could change the player's team (or perceived team?) to, for example, team 3, and make everyone aggressive toward team 3. Then when the player dies, switch them back to their previously chosen team. I feel like this should be possible, and not too complicated (depending on your definition of complicated).
-
DrDrSheldonLeeCooper
- Chief Warrant Officer

- Posts: 353
- Joined: Sat Apr 26, 2014 1:50 pm
- Projects :: Times before Empire
- xbox live or psn: No gamertag set
- Location: Coruscant City [Germany]
Re: Teamkill script
thx for help 
-
hunpeter12
- Command Sergeant Major

- Posts: 260
- Joined: Mon Apr 18, 2011 2:53 pm
- Projects :: Underground City The Complex [WIP]
Re: Teamkill script
That's what I said.jedimoose32 wrote:It's late and I just got off work so I could be way off here, but I think noobasaurus is saying that you could change the player's team (or perceived team?) to, for example, team 3, and make everyone aggressive toward team 3. Then when the player dies, switch them back to their previously chosen team. I feel like this should be possible, and not too complicated (depending on your definition of complicated).
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
Re: Teamkill script
Sorry, I thought you were suggesting changing the friendly AI over to team 3.
-
Noobasaurus
- Droid Pilot Assassin

- Posts: 2006
- Joined: Tue Aug 17, 2010 5:56 pm
Re: Teamkill script
Yeah, you could either make your whole team aggressive towards you (make you team 3 or whatever on a timer or something) or make that one unit aggressive towards your team. Of course, an even more complicated way to do this would be to change the player to team 3 and put the unit on team 4, which is friendly to your original team and enemy to your new team and the original enemies. This way, however, makes it a lot better in the long run.
- [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: Teamkill script
Like people have been saying, you can move the player to another team or move some AI units to another team. Both ways would work. They would work even better if you clear then set the AI goal to attack the player.
However, any third team still has the ability to capture CPs. You don't want a non-spawnable team capturing CPs. Don't forget to deal with that.
However, any third team still has the ability to capture CPs. You don't want a non-spawnable team capturing CPs. Don't forget to deal with that.
