Ricebug on 7/5/2014 at 19:51
I have a patrolling guard with the TrigBrainDead script carrying a lantern. When the guard is KO'd, the lantern disappears. The lantern has a CorpseLink to an unlit lantern, but I can't get it to work. In an old post, someone wrote "have the AI slay the lantern to activate the CorpseLink."
How does the AI "slay" the lit lantern?
Yandros on 7/5/2014 at 23:51
I've been through two different setups of this in DCE and am not happy with either, but I never thought of corpsing the lantern. Try just linking the guard to a DestroyTrap and that back to the lantern.
R Soul on 8/5/2014 at 00:58
I'm not sure TrigBrainDead is the ideal script to have the lantern dropped because it only activates and the end of the motion.
You could use NVHPTrigger. I just tested a standard sword guard and after KOing, he had 9 hit points.
If you want to be really fancy, you can make use of the fact that as soon as an AI is knocked out, it gets a couple of metaproperties. To one of these you could add a stim that fires once over a small distance. Give the guard a receptron to slay the lantern.
There are no meta properties for death, but you could use NVHPTrigger, set to activate below 0 HP.
Yandros on 8/5/2014 at 02:08
I assume he started with 10 and had 9 due to 1hp damage from the blackjack. You can't depend on it being a certain number, though, since he might take damage from something and then get knocked out. I had a really nice system working but it used receptrons, and so if you hit them with the blackjack while they were aware of you (and thus not knocked out) it still nixed the lantern.
Edit:
Doing the way you suggested works great. NVHPTrigger for death, and adding a stim to the M-KnockedOut metaproperty took care of KOs. My system already dropped the lantern using receptrons so it was an easy change.
FireMage on 8/5/2014 at 09:59
I'm just thinking about something... I think that it exist a custom script made by Kdau that could make this task easier to do.
I remember that he did a demo mission where he show you an exemple of scene with dropped objects after knock out or Death...
You just have to search for Kdau script in TTLG thread browser... Normaly you will be able to find it easily
Le MAlin 76 on 8/5/2014 at 11:21
Yep KDCarried and KDCarrier (see the documentation) gave with the scripts.
Yandros on 8/5/2014 at 12:15
That looks ridiculously simple, I'm going to have to start using KDScript.
R Soul on 8/5/2014 at 15:05
I agree it looks like a good solution. The lantern could have 'Slay on impact' added to its Collision Type property so that it appears to break when it hits the ground.