I am working on a simple mod to Epic that will allow the player to use the pod spewer instead of the magical pod appear/disappear. As of now, I have basic spewer functionality in the Epic buying system. iHabitat.Spew is a nice function. Here’s what happens when you call it, in order:
1) A pod appears and starts sliding out.
2) The pod becomes visible on the contact list.
3) The pod reaches the end of the conveyor belt and vanishes from the list for a few seconds.
4) The game crashes.
I figured that it needed an undock command to let go, so I whipped up a nice while loop to keep the pod trying to undock. But in my noobishness I didn’t realize it would be run atomically. *ctrl-alt-del* So I made a task. All it does it start the spew function and use that while loop to make it sleep for 0.1 seconds between attempts.
task spew_it(hship pod, hhabitat station)
{
iHabitat.Spew(station,pod);
while(!iShip.UndockSelf(pod))
{Task.Sleep(Task.Current(), 0.1);}
}
Works like a charm.
Limitations so far:
If you spew more than 4 at a time, only 4 come out. Will fix this next.
When the pod undocks, it just sits there and the next pod to come out that spot runs into it. More of an annoyance than anything else.
[center][url=”http://www.torn-stars.com/”][img]http://www.torn-stars.com/images/mdvalleysig.gif[/img][/url][/center]