Page 1 of 1
Turret Control Help [Solved]
Posted: Sun Jun 07, 2009 7:03 pm
by 501st_commander
ok,
i'm putting Turret controls in my map and they show up in ze like this,
But in-game they aren't there,
How do i fix it?
thanks
Re: Turret Control Help
Posted: Sun Jun 07, 2009 7:36 pm
by YaNkFaN
i think you have to load them through the .lua but i'm not 100% sure on that
Re: Turret Control Help
Posted: Sun Jun 07, 2009 7:50 pm
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
Re: Turret Control Help
Posted: Sun Jun 07, 2009 7:53 pm
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)
Re: Turret Control Help
Posted: Mon Jun 08, 2009 9:55 am
by 501st_commander
Thanks YaNk!
They work!
mods this can be locked