Page 1 of 1

Add ship to be shielded

Posted: Thu Aug 26, 2010 10:03 am
by linksith
Hi, I'm working on a space map with a droid controll ship and I cant figure out how to add it on the list of things to be shielded. I tried adding it into the LUA, but nothing changed. Am I supposed to put it somewhere else as well? Thanks.

Re: Add ship to be shielded

Posted: Thu Aug 26, 2010 11:44 am
by DarthD.U.C.K.
you have to ad it properly in your lua, i guess it would work kinda like this (it goes in theSetupShields-section):

Code: Select all

-- Your Shielded objects    
    local linkedShieldObjectsCUS = {list of the objects that are shielded by the new shielded, like: "droidcontrolship_1", "droidcontrolship_2"}
    shieldStuffCUS = LinkedShields:New{objs = linkedShieldObjectsCUS, controllerObject = "name of the shieldgen"}
	shieldStuffCUS:Init()
    
    function shieldStuffCUS:OnAllShieldsDown() 
        ShowMessageText("level.spa.hangar.shields.atk.down", IMP)
        ShowMessageText("level.spa.hangar.shields.def.down", ALL)
		
		BroadcastVoiceOver( "IOSMP_obj_16", IMP )
		BroadcastVoiceOver( "AOSMP_obj_17", ALL )
    end
    function shieldStuffCUS:OnAllShieldsUp() 
        ShowMessageText("level.spa.hangar.shields.atk.up", IMP)
        ShowMessageText("level.spa.hangar.shields.def.up", ALL)
		
		BroadcastVoiceOver( "IOSMP_obj_18", IMP )
		BroadcastVoiceOver( "AOSMP_obj_19", ALL )
    end
    
of course you gotta change the broadcastvoices and message textes to those of the faction the hip belongs to

Re: Add ship to be shielded

Posted: Thu Aug 26, 2010 1:36 pm
by MercuryNoodles
This new thread is unnecessary, considering you have a thread already dedicated to the subject that's still getting responses. In fact, I already went over this with you in that thread, with almost exactly the same answer. Moreover, this won't help you, since you also need a more powerful shield, and the stock scripts only allow for one overall shield value. Doing this one thing alone will get you the separate shielding, but not the more powerful shields. Not to be rude, but it would be better to keep everything regarding this in one thread, so it can get the proper treatment.