Force Fields

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
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Force Fields

Post by Fierfek »

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?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Force Fields

Post by Maveritchell »

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.
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: Force Fields

Post by Fierfek »

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.
How do I do that? Is there a tutorial you could lead me to?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Force Fields

Post by Maveritchell »

Fierfek wrote:
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.
How do I do that? Is there a tutorial you could lead me to?
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.
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: Force Fields

Post by Fierfek »

Maveritchell wrote:
Fierfek wrote:
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.
How do I do that? Is there a tutorial you could lead me to?
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.
Okay, well thanks anyway. Maybe I'll try this in a couple months.
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: Force Fields

Post by [RDH]Zerted »

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.
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: Force Fields

Post by Fierfek »

[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.
How do I do this?
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Force Fields

Post by Teancum »

Incidentally, when you have a lot of questions, combine them into one post instead of making four or more topics. Thanks :thumbs:
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Object Collision

Post by Fierfek »

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?
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Object Collision

Post by Frisbeetarian »

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().
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: Object Collision

Post by Fierfek »

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().
Woah, just looked at the scripting guide. Lots of useful stuff I hadn't noticed in there.....
Thanks! This should help.

Topics merged, it's best to keep it together -Staff
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: Object Collision

Post by [RDH]Zerted »

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.
Post Reply