|
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 3 posts ] |
|
[Inventory Help] Instantly Spacing an Actor
Author |
Message |
Insano-Man
Joined: Mon Oct 22, 2012 4:09 am Posts: 22 Location: Columbus, Ohio
|
[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?
|
Mon Apr 06, 2015 3:55 pm |
|
|
4zK
Joined: Mon Oct 11, 2010 1:15 pm Posts: 594 Location: Finlandia
|
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.
|
Mon Apr 06, 2015 7:03 pm |
|
|
Bad Boy
Joined: Fri Sep 10, 2010 1:48 am Posts: 666 Location: Halifax, Canada
|
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.
|
Mon Apr 06, 2015 9:36 pm |
|
|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Who is online |
Users browsing this forum: No registered users |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|