iTrafficCreation and iScriptedOrders
Please Log in or Create an account to join the conversation.
Next stages will add some more smarts to the code to determine if an ambush should be initiated. As well as providing a standard pirate attack group and a hook for a customised attack group (I hope).
Please Log in or Create an account to join the conversation.
Originally posted by GrandpaTrout
I wanted the player to be able to remote pilot cargo pods and dock them to his own freighters etc. But (if I remember correctly) the player gets trapped forever in the remote pilot connection once the pod docks. You could write a player watch loop that looks for the condition where the player is remote piloting a docked cargo pod (or a dead or dying sim) and moves the player back into his prior ship. There are some iRemotePilot function calls to find out the players prior ship. You might have to set the player pilot back in the ship directly. If this cannot be done, some other cargo handling method will need to be invented.
In the Epic Online scripts we found that, since freighters manouver very slowly
(and the pods may be moving rather fast), it's fastest to move your freighter
close to the pods ( 1 to 2km) and them dock them to the freighter per remote
link. You don't need anything fancy to do it:
When you create the pods (debris) call:
iRemotePilot.EnableRemoteConnection( iShip.Cast(cargo_pod), true );
That will work on anything that is a type T_cargoPod (which is derived from icShip)
and you can use the normal comms menue on the hud to establish the remote link.
Important to note: if the pod is destroyed for example by AI enemies or a
station when you are in remote mode the game will crash so its best
(for the duration of the remote link) to set:
iSim.SetIndestructable( iSim.Cast(cargo_pod), true );
Alternativly, You should be able to (I haven't tried it) call:
iRemotePilot.DeactivateConnection(); in the cargo pods death script.
It is true that you get "stuck" in the pod when you've docked it to
something (You can undock again, but can't call up the Hud menue
to disconnect the remote link while docked). That is however easy to fix.
You just need a simple while loop that "waits" until the pod is docked.
Then just call:
iRemotePilot.DeactivateConnection();
That will pop you right back into the ship you were in when you made
the initial connection.
There is also a very good command to use for special situations where you
may want to remote link to something automatically or key bind (by pog)
in the Single play game, it's :
iMultiplay.RemoteLinkTo( hship );
to deactivate the remote connection you can just call:
iRemotePilot.DeactivateConnection();
i.e. You never need to use the iMultiplay equivalent which is:
iMultiplay.SeverRemoteLinkTo( hship );
(that is intended to cut the link on both server and client in a multiplayer environment)
****
It took about 30 hrs of trail and error pogging to
figure all that out but you can try it out in the
Epic Online Mod if you wish
The MP scripts are event based so they wouldn't be very helpfull
to do what you want but the principles are the same as above.
Iwar2 Multiplayer Fan Site
Please Log in or Create an account to join the conversation.
E.g. remote connect to the freighter and then using targeting and a custom key binding start pods docking them seleves to the freighter. Or is that not technically possible for some reason? That way you could set up a whole lot of pods to dock to the remote connected ship in one hit.
Please Log in or Create an account to join the conversation.
Originally posted by Joco
Would it not be better/faster to have an automated system like the Jafs scripts? Or some variant of it?
E.g. remote connect to the freighter and then using targeting and a custom key binding start pods docking them seleves to the freighter. Or is that not technically possible for some reason? That way you could set up a whole lot of pods to dock to the remote connected ship in one hit.
It should/could be possible. You could probably install a AI pilot
in each pod and give it order to dock to the freighter the player
is in (be it either directly or per remote).
It might be less fun (less immersive) though. It would be more
like you're doing something for your money if you have to dock the
pods manually. Also, you might want to set up other chunks of
orbiting (possibly explosive?) debris that are in the way and you
would need to steer around them to get your booty home safely. Might
be more realistic and immersive if some work (and danger) is involved.
Obviously, some may think it's more fun to just sit back and watch
while the debris automagically docks for you. A matter of preference.
This is a classic example where pog interfaces with game design.
It's your game and you can design it however you want.
Just have fun doing it.
Iwar2 Multiplayer Fan Site
Please Log in or Create an account to join the conversation.
However if anyone has ideas on how the detect sphere should treat ships not quite inside it please let me know.
Cheers,
Joco.
Please Log in or Create an account to join the conversation.