Force Fields
Moderator: Moderators
- Fierfek
- High General

- Posts: 805
- Joined: Wed Jul 01, 2009 4:38 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)
Force Fields
Is it possible to use a force shield (polis massa), and only have one side be able to cross it if they have a certain command post? Like, if I had a republic shield with a command post in front of it, the cis would only be able to go through the shield if they controlled the command post outside it. Does anyone know how to do this?
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Force Fields
All soldiers (units) use the same kind of collision, so what you're talking about isn't really possible. You could set up a region in the same location as the shield that forces any entities on a certain team out if they don't own that command post, but that's a tougher workaround.
- Fierfek
- High General

- Posts: 805
- Joined: Wed Jul 01, 2009 4:38 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)
Re: Force Fields
How do I do that? Is there a tutorial you could lead me to?Maveritchell wrote:All soldiers (units) use the same kind of collision, so what you're talking about isn't really possible. You could set up a region in the same location as the shield that forces any entities on a certain team out if they don't own that command post, but that's a tougher workaround.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Force Fields
It uses "teleporting" (for lack of a better catch-all); search and you will find. To be honest, given your relative inexperience I would look for a different way to do something creative, because as I mentioned above, doing this right would be difficult.Fierfek wrote:How do I do that? Is there a tutorial you could lead me to?Maveritchell wrote:All soldiers (units) use the same kind of collision, so what you're talking about isn't really possible. You could set up a region in the same location as the shield that forces any entities on a certain team out if they don't own that command post, but that's a tougher workaround.
- Fierfek
- High General

- Posts: 805
- Joined: Wed Jul 01, 2009 4:38 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)
Re: Force Fields
Okay, well thanks anyway. Maybe I'll try this in a couple months.Maveritchell wrote:It uses "teleporting" (for lack of a better catch-all); search and you will find. To be honest, given your relative inexperience I would look for a different way to do something creative, because as I mentioned above, doing this right would be difficult.Fierfek wrote:How do I do that? Is there a tutorial you could lead me to?Maveritchell wrote:All soldiers (units) use the same kind of collision, so what you're talking about isn't really possible. You could set up a region in the same location as the shield that forces any entities on a certain team out if they don't own that command post, but that's a tougher workaround.
- [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: Force Fields
Another way without teleporting would be to enable/disable the field whenever a unit on a certain team walks up to it. To do this, put a region just a bit bigger then the field overlapping it. When the correct team enters the region, the field is disabled. When the correct team leaves the region, the field is re-enabled. A side effect of this is that enemy units would be able to cross at exactly the same time as friendly units.
- Fierfek
- High General

- Posts: 805
- Joined: Wed Jul 01, 2009 4:38 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)
Re: Force Fields
How do I do this?[RDH]Zerted wrote:Another way without teleporting would be to enable/disable the field whenever a unit on a certain team walks up to it. To do this, put a region just a bit bigger then the field overlapping it. When the correct team enters the region, the field is disabled. When the correct team leaves the region, the field is re-enabled. A side effect of this is that enemy units would be able to cross at exactly the same time as friendly units.
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Force Fields
Incidentally, when you have a lot of questions, combine them into one post instead of making four or more topics. Thanks 
- Fierfek
- High General

- Posts: 805
- Joined: Wed Jul 01, 2009 4:38 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)
Object Collision
I want to create a region in my map, where whenever a republic unit steps into it, an invisible collision object is killed, but whenever there are no republic units in it, the invisible collision returns.
I have read the parts in the FAQ/Everything You Need to Know thread, but can't make heads or tails of it.
Also, I want to have a destructable panel, that when it is destroyed, it removes the region so everyone can walk through.
How do I set this up?
I have read the parts in the FAQ/Everything You Need to Know thread, but can't make heads or tails of it.
Also, I want to have a destructable panel, that when it is destroyed, it removes the region so everyone can walk through.
How do I set this up?
- Frisbeetarian
- Jedi

- Posts: 1233
- Joined: Wed Sep 12, 2007 3:13 pm
Re: Object Collision
Have you read the documentation? Check out the Battlefront2_scripting_system.doc. You'll want to use OnEnterRegionTeam() and OnExitRegionTeam(). You can just have the destructible panel use DeactivateRegion().
- Fierfek
- High General

- Posts: 805
- Joined: Wed Jul 01, 2009 4:38 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)
Re: Object Collision
Woah, just looked at the scripting guide. Lots of useful stuff I hadn't noticed in there.....Frisbeetarian wrote:Have you read the documentation? Check out the Battlefront2_scripting_system.doc. You'll want to use OnEnterRegionTeam() and OnExitRegionTeam(). You can just have the destructible panel use DeactivateRegion().
Thanks! This should help.
Topics merged, it's best to keep it together -Staff
- [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: Object Collision
That is why you read all the documentation before posting questions. Almost everything is covered in the docs or in other tutorials people have written.
