I'm hoping someone can help me with one of 2 problems. Take your pick.
I have 2 teams made up of several classes but I want one of the following attributes to apply only to 1 class from 1 team. eg. all_inf_engineer. It needs to be a playable character so it's not as easy as putting the engineer on a 3rd team.
Either:
1. Engineer is unable to pickup the flag in CTF but his teammates can. NB. Forcing him to drop it after picking it up isn't the solution I need.
or
2. Engineer is worth more teampoints per kill in TDM than his teammates.
I'd appreciate any help with this.
Perhaps I am confusing the semantics of class, unit, player etc so if you can explain that too that's a bonus.
Cheers
:EDIT - a distant but acceptable 3rd would be having a spawn path solely for one class, where the rest of the team is forced to spawn elsewhere.
Special attributes for one unit only?
Moderator: Moderators
- Whyioughta
- Recruit Womprat Killer
- Posts: 9
- Joined: Sun Jul 15, 2007 9:26 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Special attributes for one unit only?
Last edited by Whyioughta on Sat Oct 27, 2007 8:03 pm, edited 1 time in total.
- jangoisbaddest
- Lieutenant General

- Posts: 661
- Joined: Mon Feb 27, 2006 12:10 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: All Along The Watchtower
Re: Special attributes for one unit only?
Class is what you're talking about when you want all "engineers" or "snipers" to be affected. At any rate, the answer to both your questions is in the LUA scripts. The first is defined in one of the CTF scripts in dataABC/Common/scripts, where there is a condition set that members of each team cannot pick up their own flags. You can probably adapt this code into your own mission LUA, changing the team parameter to class (see the LUA scripting documentation for more details on this). I'm not entirely sure about the second, but if you start poking around the LUAs in the dataABC/Common/scripts folder, you're bound to find code that you can adapt to suit your needs.
Edit: What would be simpler is to have an ODF paramiter you can set for the engineer, but I'm not sure if there are paramiters for the conditions you've presented.
Edit: What would be simpler is to have an ODF paramiter you can set for the engineer, but I'm not sure if there are paramiters for the conditions you've presented.
- [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: Special attributes for one unit only?
I thought there was an ODF parameter that said the class couldn't pick up flags, but I don't know what it is.
Take a look at points.lua. That is where all the easy to change point values are. To only give extra points to engineer killers, I think you will have to do a bit more work. Use a OnCharacterDeath() to determine when an engineer is killed. Give its killer some points in the way players get points for destroying objectives in space maps. Checkout a space lua to figure out how to do that.
Take a look at points.lua. That is where all the easy to change point values are. To only give extra points to engineer killers, I think you will have to do a bit more work. Use a OnCharacterDeath() to determine when an engineer is killed. Give its killer some points in the way players get points for destroying objectives in space maps. Checkout a space lua to figure out how to do that.
