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
Bob
Brigadier General
Posts: 633 Joined: Thu May 27, 2010 4:28 am
Location: at home
Post
by Bob » Tue Jul 26, 2011 9:29 am
what do I have to script if I want only team 1 to be affected from this:
Code: Select all
OnEnterRegion(
function(regIn,character)
PlayAnimation("ANIMGROUP")
end,
"REGION"
)
ActivateRegion("REGION")?
linksith
Command Sergeant Major
Posts: 284 Joined: Mon Jul 12, 2010 12:19 pm
Projects :: Waaay too many projects
Games I'm Playing :: too many
xbox live or psn: me has no xbox
Location: looking for a wifi connection
Post
by linksith » Tue Jul 26, 2011 2:08 pm
I think there might be something in the documentation that can help you I'm not sure but I thought I'd mention it.
THEWULFMAN
Space Ranger
Posts: 5557 Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:
Post
by THEWULFMAN » Tue Jul 26, 2011 2:29 pm
Something I threw together, no idea if its even close.
Code: Select all
OnEnterRegion(
function(regIn,character)
if GetCharacterTeam(character) == 1 then
PlayAnimation("ANIMGROUP")
end
end
)
ActivateRegion("REGION")
Bob
Brigadier General
Posts: 633 Joined: Thu May 27, 2010 4:28 am
Location: at home
Post
by Bob » Tue Jul 26, 2011 2:45 pm
THEWULFMAN wrote: Something I threw together, no idea if its even close.
BF2 doesn't like your idea and performs a crash
linksith wrote: I think there might be something in the documentation that can help you I'm not sure but I thought I'd mention it.
found something about "filters" ind the Battlefront2_scripting_system.doc, but not how to set 'em up. I didn't even understood what they are.
CressAlbane
Master Bounty Hunter
Posts: 1519 Joined: Fri Dec 18, 2009 8:02 am
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı
Post
by CressAlbane » Tue Jul 26, 2011 2:50 pm
THEWULFMAN wrote: Something I threw together, no idea if its even close.
Code: Select all
OnEnterRegion(
function(regIn,character)
if GetCharacterTeam(character) == 1 then
PlayAnimation("ANIMGROUP")
end
end
)
ActivateRegion("REGION")
Try this:
Code: Select all
OnEnterRegion(
function(regIn,character)
if GetCharacterTeam(character) == 1 then
PlayAnimation("ANIMGROUP")
end
end,
"REIGON"
)
ActivateRegion("REGION")
THEWULFMAN
Space Ranger
Posts: 5557 Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:
Post
by THEWULFMAN » Tue Jul 26, 2011 2:54 pm
CressAlbane wrote: OnEnterRegion(
function(regIn,character)
if GetCharacterTeam(character) == 1 then
PlayAnimation("ANIMGROUP")
end,
"REGI ON"
)
ActivateRegion("REGION")
I fixed your fixing of my fail
Oh, I just noticed. Shouldn't
be this?
CressAlbane
Master Bounty Hunter
Posts: 1519 Joined: Fri Dec 18, 2009 8:02 am
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı
Post
by CressAlbane » Tue Jul 26, 2011 2:57 pm
I don't think so; I believe it stands for "Region In" rather than "Region."
Bob
Brigadier General
Posts: 633 Joined: Thu May 27, 2010 4:28 am
Location: at home
Post
by Bob » Tue Jul 26, 2011 2:59 pm
CressAlbane wrote: Try this:
Code: Select all
OnEnterRegion(
function(regIn,character)
if GetCharacterTeam(character) == 1 then
PlayAnimation("ANIMGROUP")
end
end,
"REGION"
)
ActivateRegion("REGION")
Also crash
MungeLog wrote: unexpected symbol near `,'
CressAlbane
Master Bounty Hunter
Posts: 1519 Joined: Fri Dec 18, 2009 8:02 am
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı
Post
by CressAlbane » Tue Jul 26, 2011 3:00 pm
You did fix the "REGION" thing, right?
Does the code in the OP work on its own?
Bob
Brigadier General
Posts: 633 Joined: Thu May 27, 2010 4:28 am
Location: at home
Post
by Bob » Tue Jul 26, 2011 3:05 pm
CressAlbane wrote: Does the code in the OP work on its own?
tryin' right now. is there a reason why there are sometimes 2 "end"s in your codes?
EDIT OF DOOM
did it with 2 ends and now everything works. many thanks, mah boi!
CressAlbane
Master Bounty Hunter
Posts: 1519 Joined: Fri Dec 18, 2009 8:02 am
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı
Post
by CressAlbane » Wed Jul 27, 2011 1:04 am
No problem. The first end closes the if structure, and the second end ends the function(regIn, character) stuff.