Data Realms Fan Forums http://45.55.195.193/ |
|
[Inventory Help] Instantly Spacing an Actor http://45.55.195.193/viewtopic.php?f=1&t=45932 |
Page 1 of 1 |
Author: | Insano-Man [ Mon Apr 06, 2015 3:55 pm ] |
Post subject: | [Inventory Help] Instantly Spacing an Actor |
I've been getting back into the swing of things with Cortex Command again and one of the first things I've been doing is working on a teleporter beacon. What I want to do is pretty simple; when an actor uses the beacon, they're instantly zapped into a "fake" craft and that craft is teleported into orbit to refund the actor and their equipment. I've already got some of the groundwork laid - the beacon itself, some nifty side-functionality - but I'm clueless as to how to get the actor into the "fake" craft's inventory. What's more concerning to me is that, from what I've been digging up with via forum searches, it seems like that's just plain impossible without doing a remove-and-respawn trick, which would unfortunately break brain compatibility for me. Is there something I'm missing or is this still a pain in the butt? |
Author: | 4zK [ Mon Apr 06, 2015 7:03 pm ] |
Post subject: | Re: [Inventory Help] Instantly Spacing an Actor |
You could do it so that when the fake craft spawns on the beacon, it's forced to open its' "hatch" through lua magic, and the actor gets sucked into the inventory of the craft automatically. Then the craft uses lua magic to recognize whether there's something in its' inventory, and if there is, the invisible craft gets teleported to the top of the map, maybe with enough upward velocity to exit into the orbit, if necessary. Or, if the main purpose is to simply refund all of the gold, you can just run through the inventory of the target actor and add the sum of funds to the actor's team. That would be a much easier solution imo. |
Author: | Bad Boy [ Mon Apr 06, 2015 9:36 pm ] |
Post subject: | Re: [Inventory Help] Instantly Spacing an Actor |
You might also be able to do something along the lines of MovableMan:RemoveMO(actor); craft:AddInventoryItem(actor); MovableMan:RemoveMO seems a bit wonky though, so I`m not sure if this`ll work. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |