View unanswered posts | View active topics It is currently Wed Dec 25, 2024 6:19 pm



Reply to topic  [ 3 posts ] 
 [Inventory Help] Instantly Spacing an Actor 
Author Message
User avatar

Joined: Mon Oct 22, 2012 4:09 am
Posts: 22
Location: Columbus, Ohio
Reply with quote
Post [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
Profile YIM WWW
User avatar

Joined: Mon Oct 11, 2010 1:15 pm
Posts: 594
Location: Finlandia
Reply with quote
Post 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
Profile

Joined: Fri Sep 10, 2010 1:48 am
Posts: 666
Location: Halifax, Canada
Reply with quote
Post 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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.201s | 15 Queries | GZIP : Off ]