Noob flhook qustions/possibilities.
-
hello people. it seems tat your main flhook coding site is down, so i am posting some flhook questions here. hope it is the right place. i will try to describe what i want to do in the best code specific way i can. i have done a fair amount of frreelancer modding, but i just started to look into flhook.
–-------------------------------------------------------------------------------------------------
teleporting/manual formation.ACTIVATION:
-player types a command
example: “/command$ 2 (or playername)” ($ 12being the ids number)
-check if both players are in space and in the same system. if not, send a message to first player “please enter same system and undock”.
-check if both players are in a specific ship. if not, send message to first player “not possible”.
-the other player (player IDS #2 in this case) receives message “blablabla accept?”.
-the other player may type command in response
example: “/command yes” or “/command no”
-if response is no, first player receives message “blablabla player declined”.
-if response is yes do “during” commands below.DURING:
-constantly (every .1 or .01 seconds) teleport the second player to the position and orientation of the first player.
-if first player docks the second player also docks.
-if the second player tries to dock on anything, they are denied.
-if either player dies, so does the other.EXITING:
-a command is typed by either player.
example: “uncommand”
-any events from the “DURING” stage stop.
AI teleporting/formation
really the same thing as above. except the command is typed by itself. (no $ 2)
everything still applies, but an AI is spawned that is friendly to the player and hostile to the players enemies. this AI ship (ship is also specified in flhook, with loadout) will be constantly teleported to the player. and another commend will delete the AI.
Engine halting/stopping/becoming static.
attempting to create a command to semi turn a player into a static object. the only effect differient from a normal player would be that they can no longer move with engine controls. anything that crashes into them would also not move them at all. methods:
-a command is typed and the players engine is taken away and stored in a template so it can be later restored. (not sure what this would do)
-a command is typed and the .INI stats of the engine are changed.
-a command is typed and the players type is changed from FIGHTER or FREIGHTER to STATION.will any of these work?
thanks for looking.
-
teleporting/manual formation:
- The player control plugin does something a similar for admins. It has a /chase command that moves an admin ship to the same location as another player (it also very inefficiently jumps you through multiple systems if necessary). Forcing docking is relatively easy too. See the plugin section for download details.
- Not sure about actually putting the ship into a formation though.
AI teleporting/formation:
- Might be possible but no source code examples of how to do it.
- The Flak mod has player controlled NPCs or something like them but I don’t know how this is done.
Engine halting/stopping/becoming static:
- Might be possible but will require a lot of hacking to make it work in the way you describe.
-
thank you for the reply. ill look for the plugin. and no i do not need them to actually be in a formation.
how many times per second does this chase plugin teleport the player?
do they teleport to exact position and orientation or a little bit behind?
does it cause alot of lag or not work smoothly? -
AI teleporting/formation:
- Might be possible but no source code examples of how to do it.
- The Flak mod has player controlled NPCs or something like them but I don’t know how this is done.
If you’re referencing the AI wingmen, this is accomplished via stock FL modding techniques; no FLHook work is involved (a tutorial can be found at http://the-starport.net/index.php?option=com_smf&Itemid=26&topic=977.0). However, M0tah has made some recent discoveries which may shed some light on this, but I’m not 100% sure on that.