Author Topic: How to tell if pilot is single or mulitplayer  (Read 3278 times)

0 Members and 1 Guest are viewing this topic.

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
How to tell if pilot is single or mulitplayer
So if I'm in the Main Menu state, is there a reliable way to tell if the currently loaded pilot is a single or multiplayer pilot?
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: How to tell if pilot is single or mulitplayer
Hover over the Ready Room, I think the help text is different.

 

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: How to tell if pilot is single or mulitplayer
I meant in relation to scripting...since this is the Scripting forum.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: How to tell if pilot is single or mulitplayer
No. I actually disabled the players stuff in HEAD, because it's set up very weird. The same storage space is used in Freespace 2 to store local players/pilots, and remote players/pilots, and is loaded when the game starts or a multiplayer game is joined. Or so it looked to me. I'm not very familiar with that code.

In 3.6.9, you might be able to do it by checking the player's current campaign field.
-C

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: How to tell if pilot is single or mulitplayer
Just a small note... If you are planning on using scripting on MP keep in mind that ALL SCRIPTS are evaluated locally - so given the MP lag the scripts will give different results for separate players. So things like distance checks etc. are essentially useless.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: How to tell if pilot is single or mulitplayer
It only mattered in the Main Menu state, so not really "in game", just on the way in.  I was trying to work with that 3d scripted main menu replacement, but it didn't work right in multiplayer.  I've tried using player:getCampaignName(), but it was with a pre-3.6.10 build, so that may just be why it wasn't working as expected, although the scripting.html dump still listed it as a valid method.  Thanks for the tips though.  Can you think of any other way for a script to do a proper Ready Room button, that either goes to Multi or the Campaign based on what type of pilot is loaded, or any other information that might be able to tell you where it should be going?  Player was only one method I had considered.  If there's anything else that's different based on whether a multi or single player pilot is loaded, I could probably just use that.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: How to tell if pilot is single or mulitplayer
So no one else has any ideas?  I mean, I guess the only thing that could help at this point is a code change in the engine?  The current system just can't do it I guess?
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: How to tell if pilot is single or mulitplayer
Hmmm... there seems to be 'player:getCampaignFilename()' function still in there. But access that you first need to access the 'player' variable via 'hook variables' option. But i'm not sure if that is enough to tell the difference between SP and MP pilots.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
-C

 

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: How to tell if pilot is single or mulitplayer
Yup, saw.  That's awesome.  Now to get all that rolled up into one nice big 3.6.10 final and get FS2NetD updated to work :)
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays