Page 1 of 1

Hero's in Spacemaps?

Posted: Sun May 27, 2007 11:03 am
by Aman/Pinguin
Hm...
I've got a Problem / Question:
I want to create a Space map and want that I can play a Hero, so:
What have i to do?
Here is a part of my lua:

Code: Select all

function SetupUnits()
    ReadDataFile("dc:SIDE\\rep.lvl",   
        "rep_inf_ep3_pilot",
        "rep_inf_ep2_marine",
        "rep_inf_ep2_rifleman",
        "rep_inf_ep3_rocketeer",
        "rep_inf_ep3_sniper",
        "rep_inf_ep3_engineer",
        "rep_inf_ep3_officer",
        "rep_fly_anakinstarfighter_sc",
        "rep_fly_arc170fighter_sc",        
        "rep_fly_gunship_sc",
        "rep_fly_vwing",
        "rep_hero_oddball",
        "rep_veh_remote_terminal")

    ReadDataFile("dc:SIDE\\cis.lvl",
        "cis_inf_pilot",
        "cis_inf_marine",
        "cis_inf_rifleman",
        "cis_inf_rocketeer",
        "cis_inf_sniper",
        "cis_inf_engineer",
        "cis_inf_officer",
        "cis_fly_droidfighter_sc",  
        "cis_fly_droidgunship",
        "cis_fly_greviousfighter",
        "cis_fly_tridroidfighter",
        "cis_hero_zam")

    ReadDataFile("dc:SIDE\\tur.lvl",
        "tur_bldg_spa_cis_beam",
        "tur_bldg_spa_cis_chaingun",
        "tur_bldg_spa_rep_beam",
        "tur_bldg_spa_rep_chaingun",
        "tur_bldg_chaingun_roof"
    )
end

myTeamConfig = {
    rep = {
        team = REP,
        units = 32,
        reinforcements = -1,
        pilot    = { "rep_inf_pilot",26},
        marine   = { "rep_inf_ep2_marine",26},
        soldier  = { "rep_inf_ep2_rifleman",10, 25},
        assault  = { "rep_inf_ep3_rocketeer",1,4},
        engineer = { "rep_inf_ep3_engineer",1,4},
        sniper   = { "rep_inf_ep3_sniper",1,4},
        officer = {"rep_inf_ep3_officer",1,4},
    },
    cis = {
        team = CIS,
        units = 32,
        reinforcements = -1,
        pilot    = { "cis_inf_pilot",26},
        marine  = { "cis_inf_marine",26},
        soldier  = { "cis_inf_rifleman",10, 25},
        assault  = { "cis_inf_rocketeer",1,4},
        engineer = { "cis_inf_engineer",1,4},
        sniper   = { "cis_inf_sniper",1,4},
        officer = {"cis_inf_officer",1,4},

    }

}
    SetHeroClass(REP, "rep_hero_oddball")
    SetHeroClass(CIS, "cis_hero_zam") 
I hope somebody can help me =/


ps.: The Units are working i tested them already as a normal unit

Posted: Sun May 27, 2007 12:08 pm
by MercuryNoodles
What kind of problem are you experiencing? This doesn't really give me even so much as a clue as to what the problem is.

Btw your max units for all classes should add up to exactly the value you put in for "Units =". I can't remember if this causes any major malfunctions, but those max values of 26 and such won't do much good when the team is limited to 32 units total.

Posted: Sun May 27, 2007 12:21 pm
by Aman/Pinguin
MercuryNoodles wrote:What kind of problem are you experiencing? This doesn't really give me even so much as a clue as to what the problem is.

Btw your max units for all classes should add up to exactly the value you put in for "Units =". I can't remember if this causes any major malfunctions, but those max values of 26 and such won't do much good when the team is limited to 32 units total.
Problem:
The Message "Play now as "Commander Oddball". Press F1 ..." dont appears!
I dont know why =/
Is there any other thing i have to write into the lua or some other files?

Posted: Mon May 28, 2007 4:03 am
by MercuryNoodles
I think I figured it out. After a little reading, I found this:

EnableSPHeroRules()


^You need that in your lua. Read the Lua Guide documentation to see where it goes.

Posted: Mon May 28, 2007 12:47 pm
by Aman/Pinguin
:D Yeah!!! Thanks I will test it in a few minutes... Thanks man! :D

Posted: Fri Jun 01, 2007 2:40 am
by Aman/Pinguin
ok i tested it but it still dont works... is there maybe another thing i have to put into my .lua?

Posted: Fri Jun 01, 2007 3:53 am
by MercuryNoodles
You did tell it to munge the Common folder (via the checkbox) when you munged, right?

If so, what do your error logs say?

Posted: Fri Jun 01, 2007 1:15 pm
by Aman/Pinguin
Yes i munged the common folder, in the MungeLog is no error about my lua or another thing with the heros =/

Posted: Sat Jun 02, 2007 3:43 am
by MercuryNoodles
There is one other thing you could try. Well, two actually. Try cleaning and remunging. If that doesn't help, you could try doing a manual clean, and remunging everything.

Well, the main munge log only gives so much information. It might be a good idea to check the one the bf2_modtools.exe spits out, and I'm also interested in what the logs say in _Build/Worlds/***.

Let's try cleaning, first, though. If the that doesn't help, then we should check those error logs.

Posted: Sat Jun 02, 2007 3:51 am
by Aman/Pinguin
I cant use the BF2_modtools.exe because i've got the german DVD version...
I already cleaned and remunged =/ i manual remunged and cleaned it too... well if heros in spacemaps dont work i will put them as a normal unit ^^

Posted: Sat Jun 02, 2007 8:39 am
by MercuryNoodles
In that case, perhaps checking the error logs in the _Build folder will shed some light on the situation. I don't think there's any reason for a hero to not work in space, so I feel there's something still missing/incorrect.