Multiplayer Scripting?
-
Sounds interesting. Am I correct that you could use this to spawn and control NPCs? That’s one of the major things still missing IMHO.
-
M0tah wrote some mission-handling FLHook code, however there are a few issues still. For example, if any player logs out, everyone’s mission thread is ended. Also, if a player dies, the thread he/she creates on respawn is immediately killed off (we worked around that by adding a respawn delay, which seemed to fix it). W0dk4, were you able to launch missions without the StoryHandler thread? Chances are, most of these bugs were caused from using StoryLauncher to handle mission launching, but M0tah never figured out how to fire missions using FLHook directly.
As it is, it’s impossible to use the mission scripting in a live server setting for anything other than quick things to do when a player logs in (we use it to reset certain reputations on login that should always be neutral/friendly, etc.). If anyone wants to build upon the mission-handling code already implemented in his FLHook, the source is available in M0tah’s latest test release: http://www.memes.no/88flak/downloads/beta/reallybeta/FLHook 1.6.7 test 20.7z I’m sure he wouldn’t mind anyone using it as long as his work was credited.
Very cool to see people are still looking into this.
-
w0dk4 wrote:
Yes, Procyon has it.I noticed that when a player joins procyon with their PHook enabled, The moment a new player joins the server and is asked to name their character, they can also choose their rep for new starts.
Maybe something like this can be used to get around the multiple spawning thats happens by only starting the script with a certain rep. (no idea atm how any of this is done).
-
Gisteron wrote:
download why’s huge effects pack. there is a tutorial with code examples for such explosions. thanks on that, why, made that stuff with slight additions in my mod, looks fantasticI don’t need effects pack, glow and other engine upgrades doesnt work on my ancient PC.
I need only fountain explosion HELP PLEASE -
You don’t understand.
Grab Why’s effect pack and SEE how it’s done.
-
Really needed server-side “mission - bot” presence, may be dll that creates phantom player with [storyinfo] in char that is constantly at server without kicks, timeouts
-
Again with w0dk4s trickery, FW:TOW has fully functional missions. You can check their dev blogs for more information. From what I’ve heard, its accomplished through expert use of Hook to launch arbitrary mission files. I don’t know when this functionality will be released as a Hook plugin, for all I know there’s some kinks to work out before it becomes solid enough to work independent as a plugin.
-
I’ll wait new flhook with plugins, because this only thing that I have to compile without problems (svn)…
-
wait a minute, so this means you can have convoy protection missions in the MP setting, just like you do in SP?
Hmm, is it also possible to therefore create convoy attack missions to attack and destroy the same convoy another player is protecting as well?…
Sorry, just curious as to what exactly this implies - and since I stop by only once in a blue moon, I may have missed all this in other threads.
-
for convoy I tried “follow = player” but it is not worked, will try again soon with followop hack
-
Hmm, is it also possible to therefore create convoy attack missions to attack and destroy the same convoy another player is protecting as well?…
I don’t think it will ever be possible as ships created by a mission can’t be tracked by another one. However, i’ve successfully created an escort mission, with one playable side only.
-
Yep, convoy/wingman works.
-
Necro-post. I’ve made some great progress in making multiplayer scripting practical, and I think bumping this thread would gather more attention than my other post that goes into more detail.
-
I had a short look at mission scripting (launching them via flhook).
The main remaining bug seems to be that missions are paused when somone leaves the server (they are not destroyed, they just won’t continue).Act_StateChange = SUCCEED is crashing my server.
A workaround could be actually using FAIL (as KJ mentioned) and patching out the window which pops up.
NO_STATE would actually work too but it won’t destroy the mission.The best way would prolly be to trigger a FLHook callback func when the Act_StateChange event is fired.
The mission ini will be read when you start the mission.
It seems that there’s a function @ ElapseTime which calls the events.
That’s all so far.