Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: FUBAR-BDHR on January 30, 2009, 01:35:44 am

Title: Need clarification on num-players
Post by: FUBAR-BDHR on January 30, 2009, 01:35:44 am
Does it return the number of players that start the mission or at any given time in the mission?  Basically if a player drops does it reduce the value it returns during the mission by 1?
Title: Re: Need clarification on num-players
Post by: karajorma on January 30, 2009, 11:53:05 am
The game runs through all the objects in the game and checks if they have the OF_PLAYER_SHIP flag set. This flag is unset when a player is respawned as an AI ship. So when a player drops until they respawn as an AI the wrong number will be given. I'm not sure how long that takes though. If the game self destructs a dropped player it's not an issue.
Title: Re: Need clarification on num-players
Post by: FUBAR-BDHR on January 30, 2009, 02:24:26 pm
OK I'll have to store it to a variable at mission start then or if someone drops any arrival cue based on num-players will mess up.  Glad I though of that one now.