Turret Control Help [Solved]

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
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Turret Control Help [Solved]

Post by 501st_commander »

ok,
i'm putting Turret controls in my map and they show up in ze like this,
Hidden/Spoiler:
Image
But in-game they aren't there,
Hidden/Spoiler:
Image
How do i fix it?

thanks
YaNkFaN
Field Commander
Field Commander
Posts: 943
Joined: Sat Dec 13, 2008 8:17 am

Re: Turret Control Help

Post by YaNkFaN »

i think you have to load them through the .lua but i'm not 100% sure on that
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Turret Control Help

Post by 501st_commander »

how?
i looked at the space luas and i didn't find anything on them other than the ones that is controled by the mainframe,
Hidden/Spoiler:
ScriptCB_DoFile("LinkedTurrets")
function SetupTurrets()
--CIS turrets
turretLinkageCIS = LinkedTurrets:New{ team = CIS, mainframe = "cis-defense",
turrets = {"cis_turr_1", "cis_turr_2", "cis_turr_3", "cis_turr_4", "cis_turr_5", "cis_turr_6"} }
turretLinkageCIS:Init()

function turretLinkageCIS:OnDisableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.down", REP)
ShowMessageText("level.spa.hangar.mainframe.def.down", CIS)

BroadcastVoiceOver( "ROSMP_obj_20", REP )
BroadcastVoiceOver( "COSMP_obj_21", CIS )
end
function turretLinkageCIS:OnEnableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.up", REP)
ShowMessageText("level.spa.hangar.mainframe.def.up", CIS)

BroadcastVoiceOver( "ROSMP_obj_22", REP )
BroadcastVoiceOver( "COSMP_obj_23", CIS )
end

--REP turrets
turretLinkageREP = LinkedTurrets:New{ team = REP, mainframe = "rep-defense",
turrets = {"rep_turr_1", "rep_turr_2", "rep_turr_3", "rep_turr_4", "rep_turr_5", "rep_turr_6"} }
turretLinkageREP:Init()

function turretLinkageREP:OnDisableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.down", CIS)
ShowMessageText("level.spa.hangar.mainframe.def.down", REP)

BroadcastVoiceOver( "ROSMP_obj_21", REP )
BroadcastVoiceOver( "COSMP_obj_20", CIS )
end
function turretLinkageREP:OnEnableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.up", CIS)
ShowMessageText("level.spa.hangar.mainframe.def.up", REP)

BroadcastVoiceOver( "ROSMP_obj_23", REP )
BroadcastVoiceOver( "COSMP_obj_22", CIS )
end
end
YaNkFaN
Field Commander
Field Commander
Posts: 943
Joined: Sat Dec 13, 2008 8:17 am

Re: Turret Control Help

Post by YaNkFaN »

it's good that you looked at the space luas but you forgot to look further down

SetMemoryPoolSize("EntityRemoteTerminal", 12)

add that to your memory pools and just a side note most interactive bf2 objects (ie flags towcables have memory pools associated with them)
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Turret Control Help

Post by 501st_commander »

Thanks YaNk! :thumbs:
They work!

mods this can be locked
Post Reply