Trouble with Kashyyyk Barriers

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
Zaniac
Private First Class
Posts: 77
Joined: Wed Oct 25, 2006 7:07 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Trouble with Kashyyyk Barriers

Post by Zaniac »

Ok, so I'm making a Kashyyk Map. In it at two different points on the map I made a pen sort of thing where the wookiees are kept enslaved. As seen here:
http://i129.photobucket.com/albums/p231 ... 8/wok3.jpg

http://i129.photobucket.com/albums/p231 ... 8/wok4.jpg

For those of you who can't see the pics the pen door is blocked off by the Kashyyk Seawall. (the big wooden one)

Now my problem is the wookiees inside crowd around the wooden barricade and with enough running, simply run out of the pen as seen here:
http://i129.photobucket.com/albums/p231 ... 8/wok1.jpg

http://i129.photobucket.com/albums/p231 ... 8/wok2.jpg

How can I stop the wookiees from not running out until someone destroys the front barricade? Any help would be appreciated.

And also, is there any way I can code my lua so that the all/rep focuses on destroying the wooden baricade because as of now they just ignore it. Thanks again.
t551
General
General
Posts: 791
Joined: Sat Jul 16, 2005 3:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

RE: Trouble with Kashyyyk Barriers

Post by t551 »

To stop the wookies, you can place AI barriers.
Zaniac
Private First Class
Posts: 77
Joined: Wed Oct 25, 2006 7:07 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Zaniac »

I know about AI barriers but I want the wookiees to be able to leave the pen after someone has destroyed the wooden barrier. Like in the shipped Kashyyyk map, how do they do it that the droids don't go through the seawall near the back cp until they have destroyed the switch? I need to learn how to do something like that, does anyone know how to do this?
User avatar
valiant
1st Lieutenant
1st Lieutenant
Posts: 449
Joined: Fri Sep 16, 2005 6:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by valiant »

Look in the scripting of the campaign map shipped in the assets.
Zaniac
Private First Class
Posts: 77
Joined: Wed Oct 25, 2006 7:07 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Zaniac »

Ok, I've taken a look at the KAS scripts and believe I've found what I need, so I copied what I figured I needed out of the script and into mine:
(I renamed everything that was woodl, woodc, or woodr to door1 and door2 becaused that's what I've named the wooden barricades in my map.)
--Gate Stuff --
BlockPlanningGraphArcs("seawall1")
BlockPlanningGraphArcs("door1")
BlockPlanningGraphArcs("door2")
DisableBarriers("disableme");

SetProperty("door1", "MaxHealth", 25000)
SetProperty("door1", "CurHealth", 25000)
SetProperty("door2", "MaxHealth", 25000)
SetProperty("door2", "CurHealth", 25000)

OnObjectKillName(woodl, "door1");
OnObjectKillName(woodc, "woodc");
OnObjectRespawnName(woodll, "door1");
OnObjectRespawnName(woodcr, "door2");
end

function door1()
UnblockPlanningGraphArcs("door1");
DisableBarriers("door1");
SetProperty("door1", "MaxHealth", 1800)
-- SetProperty("door1", "CurHealth", 15)
end

function door2()
UnblockPlanningGraphArcs("door2");
DisableBarriers("door2");
SetProperty("door2", "MaxHealth", 1800)
-- SetProperty("door2", "CurHealth", 15)
end

function door1()
BlockPlanningGraphArcs("door1")
EnableBarriers("door1")
SetProperty("door1", "MaxHealth", 15000)
SetProperty("door1", "CurHealth", 15000)
end

function door2()
BlockPlanningGraphArcs("door2")
EnableBarriers("door2")
SetProperty("door2", "MaxHealth", 15000)
SetProperty("door2", "CurHealth", 15000)
end
After munging this I got these errors:
C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\KAE\KAEc_con.lua:61: <eof> expected near `end'
ERROR[scriptmunge scripts\KAE\KAEc_con.lua]:Could not read input file.ERROR[scriptmunge scripts\KAE\KAEc_con.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings
I can't find what's wrong, can anyone see what I've done wrong?
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

How to find the error

Post by AceMastermind »

There appears to be something missing on line 61 in your KAEc_con LUA,
to find line 61, just open KAEc_con in notepad, then hit ctrl+G and type 61, to go to that line.
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

Post by Teancum »

DisableBarriers("MY_BARRIER_NAME") and EnableBarriers("MY_BARRIER_NAME") will turn barriers on/off.
Zaniac
Private First Class
Posts: 77
Joined: Wed Oct 25, 2006 7:07 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Zaniac »

Thank you Teancum I'll try that.

Ace: Turns out I just took out line 61 (all it said was: "end") and I didn't get any errors anymore. :lol: I love it when my dumb luck solves my problems.
Post Reply