Page 1 of 1
Linked objects
Posted: Sun Jul 21, 2013 11:53 pm
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
Re: Linked objects
Posted: Sun Jul 21, 2013 11:57 pm
by Marth8880
Re: Linked objects
Posted: Mon Jul 22, 2013 10:29 pm
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

Re: Linked objects
Posted: Tue Jul 23, 2013 12:31 pm
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
)