Linked objects

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
Lorul1
Rebel Colonel
Rebel Colonel
Posts: 562
Joined: Wed Apr 24, 2013 10:34 pm
Projects :: Assault on Theed
Games I'm Playing :: Battlegrounds
xbox live or psn: No gamertag set
Location: Your House

Linked objects

Post by Lorul1 »

Hello. Quick question. I would like to make the life support system computer from space linked to the force field from mygeeto (Shield-command), so that when you destroy the life support it unlocks the force field just like in the story mode mission but with the life support computer. I've heard that linked destroyables won't work
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Linked objects

Post by Marth8880 »

User avatar
Lorul1
Rebel Colonel
Rebel Colonel
Posts: 562
Joined: Wed Apr 24, 2013 10:34 pm
Projects :: Assault on Theed
Games I'm Playing :: Battlegrounds
xbox live or psn: No gamertag set
Location: Your House

Re: Linked objects

Post by Lorul1 »

Thank you for the guide but its kinda hard to follow can you pleases explain to me in steps or link me to another easier one. It's just that Lua's kinda new to me :|
User avatar
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Re: Linked objects

Post by Locutus »

Paste this after conquest:sart() but before the end of Scriptpostload():

OnObjectKill( --this function triggers every time an object is killed
function(object, killer)
if GetEntityName(object) == "NameOfLifesupPropInZeroEditor" then --check wether the killed object is the one we are looking for
KillObject("NameOfShieldPropInZeroEditor") --if yes, kill the shieldprop. note that it must be a destructible building
end
end
)
Post Reply