Modding, Mission Design, and Coding > The Scripting Workshop
Interactive control over multiplayer mission?
ksotar:
Yes, that's pretty much so :)
karajorma:
Why can't you just build this into the mission and just use key-presses to make it happen? I assume the server will be in the same room as the player, right?
ksotar:
Ehm, I'm just a beginner with SEXPs - is it possible just to assign keypresses to actions? Server maybe will be, or may be not (most probably) in the same room with players, but how does it matter? :nervous:
procdrone:
--- Quote from: ksotar on December 29, 2017, 11:00:38 am ---Ehm, I'm just a beginner with SEXPs - is it possible just to assign keypresses to actions? Server maybe will be, or may be not (most probably) in the same room with players, but how does it matter? :nervous:
--- End quote ---
Normally you can do that. Though im unaware if that works as intended via Multiplayer. But yes, you can assign a SEXP that asks when->keypressed("your key") then do (x). Your X can be a creation of a new ship, or destruction of another (etc.). If Im not mistaken you can assign shortcrouts like alt-key or shift-key. If you want to reuse the functionality you must remember to set up repeat count up to a ludicrous level, and always remember, to clear the "key pressed" after each action, so it doesn't repeat when not asked for.
karajorma:
It depends which kind of server you are running. On a standalone you can't send key presses. You need to be on a server that you are also playing on.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version