Search

Last Downloaded

zip-0Logitech WIngman Extreme
rar-1IWAR2 Reshade

Login

iTrafficCreation and iScriptedOrders

GrandpaTrout's Avatar
King of Space King of Space
  • Posts: 1135
  • Thanks: 0

Re:

20 years 8 months ago
#12705
Excellent! You made my day! It looks like the pilot setup had to be run. Otherwise, this does not look different than the code that complained of an invalid leader.

Feel like trying to make the pod spewer functions work?

Please Log in or Create an account to join the conversation.

Joco's Avatar Topic Author
Regular Regular
  • Posts: 148
  • Thanks: 0

Re:

20 years 8 months ago
#12707
Pod spewer functions? Sure I'll give em a go. errr - better tell me which package I should be looking at so I know I am not off on a false trail.

Cheers,
Joco.

Please Log in or Create an account to join the conversation.

GrandpaTrout's Avatar
King of Space King of Space
  • Posts: 1135
  • Thanks: 0

Re:

20 years 8 months ago
#12708
iHabitat.Spew has a function for exiting cargo pods from a pod spewer. But there is no function for docking pods to a spewer and then removing them from the game. So it is still a bit of a mystery how that is done. But it is worth figuring out how the code spews pods out first.

It could be the same function works two ways. If the pods exist and are nearby the station (like the ones loaded on a docked freighter), it will pull them in. If the pods are not yet placed in game, (or are very distant from the station) it spews them out. I don't honestly know, I am just thinking out loud about how I would have coded the function.

Please Log in or Create an account to join the conversation.

Joco's Avatar Topic Author
Regular Regular
  • Posts: 148
  • Thanks: 0

Re:

20 years 8 months ago
#12710
Have some progress.

I have the iHabitat.Spew function spitting out cargo pods. Just need to sort out how to associate the hcargo info with an cargo pod sim - unless that is info already understoad. Not perfect yet but some progress I think.

Please Log in or Create an account to join the conversation.

Cougaris's Avatar
I'm new here! I'm new here!
  • Posts: 9
  • Thanks: 0

Re:

20 years 8 months ago
#12711
This is good stuff.

I'll be joining in all the whiz-bang as soon as I get a bit more familiar with the source packages and such.

I hope you won't mind me asking simple questions every so often. :)

Please Log in or Create an account to join the conversation.

GrandpaTrout's Avatar
King of Space King of Space
  • Posts: 1135
  • Thanks: 0

Re:

20 years 8 months ago
#12712
Originally posted by Joco

Have some progress.

I have the iHabitat.Spew function spitting out cargo pods. Just need to sort out how to associate the hcargo info with an cargo pod sim - unless that is info already understoad. Not perfect yet but some progress I think.

The following should do the trick. And Welcome to the forum Cougaris!
Code:
hsim CreateCargoPod(string cargo_name, string owner_faction, string cargo_faction) { hgroup pgroup; hsim pod; hcargo cargo; string sim_url; cargo = iCargo.Find(iInventory.CargoTypeFromName(cargo_name)); //sim_url = ECargoScript.CargoSim(cargo); // removing ecargo script temporarily, so use this default instead. sim_url = "ini:/sims/ships/utility/freightpod"; pod = Sim.Create(sim_url, cargo_name); if (none == pod) { pod = Sim.Create("ini:/sims/ships/utility/freightpod", cargo_name); } if (T_CargoPod == iSim.Type(iSim.Cast(pod))) { iSim.SetFaction(iSim.Cast(pod), iFaction.Find(owner_faction)); Object.AddIntProperty(pod,"cargo",iInventory.CargoTypeFromName(cargo_name)); Object.AddIntProperty(pod,"cargo_faction",iFaction.Allegiance(iFaction.Find(cargo_faction))); } return pod; }

Please Log in or Create an account to join the conversation.