Passable shields only for friendly units? Possible?

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
Redline
2nd Lieutenant
2nd Lieutenant
Posts: 396
Joined: Tue Jan 16, 2007 4:22 pm
Projects :: Space to Ground [reworking]
Games I'm Playing :: Different Games
xbox live or psn: No gamertag set
Location: The left side of the moon
Contact:

Passable shields only for friendly units? Possible?

Post by Redline »

Hello, I've a short question about passable shields only for friendly units.
Is it possible to set up shields so that they let only pass there own units and block enemy units of passing the shield?
I've tried many different ways but without success.
My last try was this code. Check it out. (This code is not working anyway)
Hidden/Spoiler:
[code]

SoldierCollision = "CLEAR"="0"

TargetEnemy = "1"
TargetNeutral = "1"
TargetFriendly = "0"

TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "1"
TargetBuilding = "1"

AITargetPerson = "1"
AITargetAnimal = "1"
AITargetDroid = "1"
AITargetVehicle = "1"
AITargetBuilding = "1"


SoundProperty ="shield"
BuildingSound ="shield"[/code]
Well, if you knew other ideas I would be very thankful to you. :wink: :wink:
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Passable shields only for friendly units? Possible?

Post by DarthD.U.C.K. »

the line "soldiercollision = "clear"" disables the collision for all soldiers irespectively of their team, i dont think you can do a teamdependend shield via odf-coding
stardestroyer001
Sergeant Major
Sergeant Major
Posts: 239
Joined: Fri Apr 16, 2010 7:02 pm
Projects :: Space Coruscant [before it corrupted]
Games I'm Playing :: World of Warships
xbox live or psn: StarDestroyer75
Location: Canada
Contact:

Re: Passable shields only for friendly units? Possible?

Post by stardestroyer001 »

Unless you tried setting up the shield code somehow so only, say, Team 1 (Rep/Imp) can go through and Team 2 (CIS/Reb) can't, I don't think it'll work if it's only set to friendlies, enemies, etc. Think of it this way: Because of the nature of the game, in which you can choose to be either team, who are the friendly units? You could play Emps and have Emps go through the shield, then play as Rebs and have the Emps being unable to go through the shield, and vice versa with the Rebs. In short, have it assigned to a team number instead of a player's side.

EDIT: I just realized that my answer wasn't answering the question. :faint: Ok, so it's a workaround suggestion, not a solution to your problem, Redline. If you can't ODF code the shield to do anything like that anyways, then don't worry about it.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Passable shields only for friendly units? Possible?

Post by Fiodis »

stardestroyer001 wrote:Think of it this way: Because of the nature of the game, in which you can choose to be either team, who are the friendly units?
...The ones on your team? That's why these odf lines work:

Code: Select all

TargetEnemy         = "1"
TargetNeutral       = "0"
TargetFriendly      = "0"
They don't specify any specific team.
stardestroyer001
Sergeant Major
Sergeant Major
Posts: 239
Joined: Fri Apr 16, 2010 7:02 pm
Projects :: Space Coruscant [before it corrupted]
Games I'm Playing :: World of Warships
xbox live or psn: StarDestroyer75
Location: Canada
Contact:

Re: Passable shields only for friendly units? Possible?

Post by stardestroyer001 »

What I meant was, unless Redline wanted one day the Emps to go through the shield and another day they don't, you need to tell the game that the shield allows Team 1 for example to go through and Team 2 to be blocked. That way, if you're Emps, you can go through, and if you decide to play Rebs, then you can't go through, but the Emps still can.

So, essentially, you need to specify a team, or have the object already affiliated with a team to start with.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Passable shields only for friendly units? Possible?

Post by Fiodis »

stardestroyer001 wrote:What I meant was, unless Redline wanted one day the Emps to go through the shield and another day they don't, you need to tell the game that the shield allows Team 1 for example to go through and Team 2 to be blocked. That way, if you're Emps, you can go through, and if you decide to play Rebs, then you can't go through, but the Emps still can.

So, essentially, you need to specify a team, or have the object already affiliated with a team to start with.
Mhm. Where do you specify the team?
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Passable shields only for friendly units? Possible?

Post by FragMe! »

If you place the shield object in ZE you can specify the team there same as you would a CP.
Not sure how you are doing the shield though.
User avatar
Lagomorphia
Major
Major
Posts: 502
Joined: Sun Dec 13, 2009 10:02 am

Re: Passable shields only for friendly units? Possible?

Post by Lagomorphia »

You could have it damage hostiles rather than block them.
Post Reply