a few questions

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
destos
Chief Warrant Officer
Chief Warrant Officer
Posts: 349
Joined: Sat Sep 22, 2007 10:37 pm

a few questions

Post by destos »

ok i got a few questions

1. What are the auto turrets in hoth hunt called (they are the chainguns that sit on the tripod and shoot at the wampas automatically)

2. is there a code to stop the enemy from spawning for a set amount of time ( im trying to make a wave of enemies appear and then give you some time to repair all your walls and turrets before the next wave comes.)

3. is there a code so that certain classes are not allowed to spawn (like say i only wanted stormies to spawn but later on i want assualt troopers to be allowed to spawn as well)
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: a few questions

Post by jedimoose32 »

To answer #3:

I believe you add a lua function that uses the AddUnitClass effect after a timer expires or after the attacking team's score reaches a certain value.

EDIT:

Add your function after this one (or inside, I can't remember):

Code: Select all

function ScriptPostLoad()      
And then your side should only have this:

Code: Select all

ReadDataFile("SIDE\\rep.lvl",
                             "rep_inf_ep3_rifleman")
and then,

Code: Select all

rep = {
         team = REP,
         units = 20,
         reinforcements = 250,
         soldier  = { "rep_inf_ep3_rifleman",9, 25},
             }
EDIT 2:

To answer #2:

Same basic principle. Make a function so that when the defending team's score reaches a certain number, the attacking team's reinforcement count goes to 1. From my experience this disallows any spawning except for human spawning, and I don't know why. In the same function, start a timer. Then make another function. In this one, if the timer has expired the reinforcement value goes back to whatever you want.
User avatar
destos
Chief Warrant Officer
Chief Warrant Officer
Posts: 349
Joined: Sat Sep 22, 2007 10:37 pm

Re: a few questions

Post by destos »

i got one last question now that i think of it...

if i where to copy the assault mode ai goals ( so that they only hunt for enemies instead of trying to capture command posts) would that work?
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: a few questions

Post by jedimoose32 »

It should, just make sure you reference "ObjectiveTDM.lua" in the beginning of your world's lua. Just underneath "ObjectiveConquest.lua" and "setup_teams.lua".
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: a few questions

Post by AQT »

destos wrote:1. What are the auto turrets in hoth hunt called (they are the chainguns that sit on the tripod and shoot at the wampas automatically)
Those turrets are called "tur_bldg_chaingun_tripod".
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: a few questions

Post by jedimoose32 »

AQT wrote:
destos wrote:1. What are the auto turrets in hoth hunt called (they are the chainguns that sit on the tripod and shoot at the wampas automatically)
Those turrets are called "tur_bldg_chaingun_tripod".
Correct, and they belong to a side, not a world, just to clarify.

Hope that this topic has helped you. I can't wait for this map to show its face here on Gametoast!
User avatar
FelixXxX
Private Third Class
Posts: 56
Joined: Mon Mar 02, 2009 11:04 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: Bespin

Re: a few questions

Post by FelixXxX »

Assault mode ai goals

AddAIGoal(ATT, "Deathmatch", 100)
AddAIGoal(DEF, "Deathmatch", 100)
put that in instead of the conquest ones
Post Reply