Linked objects
Moderator: Moderators
- Lorul1
- Rebel Colonel

- Posts: 562
- Joined: Wed Apr 24, 2013 10:34 pm
- Projects :: Assault on Theed
- xbox live or psn: No gamertag set
- Location: Your House
Linked objects
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
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: Linked objects
This should come in handy: http://www.gametoast.com/forums/viewtop ... 27&t=12473
- Lorul1
- Rebel Colonel

- Posts: 562
- Joined: Wed Apr 24, 2013 10:34 pm
- Projects :: Assault on Theed
- xbox live or psn: No gamertag set
- Location: Your House
Re: Linked objects
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 
- Locutus
- 1st Lieutenant

- Posts: 420
- Joined: Fri Jun 04, 2010 10:08 am
- Projects :: Stargate Battlefront Pegasus
- Location: Germany
- Contact:
Re: Linked objects
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
)
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
)
