Add ship to be shielded

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

Locked
User avatar
linksith
Command Sergeant Major
Command Sergeant Major
Posts: 284
Joined: Mon Jul 12, 2010 12:19 pm
Projects :: Waaay too many projects
Games I'm Playing :: too many
xbox live or psn: me has no xbox
Location: looking for a wifi connection

Add ship to be shielded

Post 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.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Add ship to be shielded

Post 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
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Add ship to be shielded

Post 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.
Locked