I usually answer the request. But now I/we are asking for a gateway vessel. Something like the B5 gateway. Where a vessel flies into and and now transported to where the other gate is. Like a Worm hole.
I usually answer the request. But now I/we are asking for a gateway vessel. Something like the B5 gateway. Where a vessel flies into and and now transported to where the other gate is. Like a Worm hole.
But more like the b5 gates that act as entrance and exits to another area.
Thanks. Do you mean like this:
http://orbithangar.com/searchid.php?ID=2609
I will take a look. What we are trying to you as I understand it is like a wormhole it is a portal to a different area.
So how far would it be to code?
I'm liking the sound of this. Not sure how available I'll be, but let me know if I can help in any way. Would love to adapt something to an actual B5 Jump Gate.
I'm liking the sound of this. Not sure how available I'll be, but let me know if I can help in any way. Would love to adapt something to an actual B5 Jump Gate. Might give me an excuse to dust off the Cortez and update her to 2016.
---------- Post added at 09:03 AM ---------- Previous post was at 08:58 AM ----------
For B5-type implementation, the Jump Gate would have multiple possible destinations.
A couple things to consider:
1) How to present the list of available Jump Gate destinations to the user. HUD? MFD?
2) How to handle velocity of the vessel as it exits the jump gate. Same as when it entered, but on the +Z-axis of the arrival gate?
I don't have the gate code.
Yes but you add new planets,... then you could use the gateway to them.
So can someone code a simple version?
for (i=0;i<oapiGetVesselCount();i++)
{
OBJHANDLE hvessel=oapiGetVesselByIndex(i);
VECTOR3 rpos;
oapiGetRelativePos(hvessel,GetHandle(),&rpos);
double distance=length(rpos);
if((distance<2)&&(rpos.z>0)) // 2 meters is an example and rpos.z is used only to check if the ship is approaching from the right side, but depends on mesh and other things
{
VESSELSTATUS2 vs_vessel,vs_other_gate;
VESSEL *v;
v=oapiGetVesselInterface(hvessel);
v->GetStatusEx(vs_vessel);
OBJHANDLE h_other_gate=oapiGetVesselByName("Gate_B"); //if this is gate A, you can play around to make the same code for both vessels
VESSEL *v_other_gate;
v_other_gate=oapiGetVesselInterface(h_other_gate);
v_other_gate->GetStatusEx(&vs_other_gate);
vs_vessel.rbody=vs_other_gate.rbody;
vs_vessel.rpos=vs_other_gate.rpos;
vs_vessel.rvel=vs_other_gate.rvel;
vs_vessel.vrot=vs_other_gate.vrot;
vs_vessel.arot=vs_other_gate.arot;
v->DefSetStateEx(vs_vessel);
}
}
- Find the parent vessel of a group of attached vessels, when one vessel triggers the jump gate.
- Connect two jump gates and handle the state changes
Of the unknown problems:
Just getting the state vector of the target jump gate and setting the state vector data of the vessel to the state vector of the target should be easy.
- How do docked vessels behave?
- Can attached payloads be detached correctly after a jump?
- Can you make sure, that crews of some add-ons are not killed during a jump? (possible mitigation: Use the jump process to gently equalize the velocity vectors)
yesThanks. I can try it out later today. So basically this takes the vessel that is close by (2 ) and puts in where GAte B is?
So same code just 1 vessel Gate a and the other Gate B?
yes
suggestion is to use something like ... if this vessel is Gate_A then look for Gate_B otherwise look for Gate_A in the code, so you can just build one dll, place two vessels of the same class in a scenario and simply name those vessels Gate_A and Gate_B
So use that code to make a GATEway vessel and call it Gate A and another Gate B.
if there are only two is easy, if you want more and if you want to even choose where to go it may become more complex