08.11.2012 Views

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

mplay_session_find() searches for all sessions that still accept players<br />

and returns the number of sessions found.<br />

mplay_session_name(numb) returns the name of session number numb (0<br />

is the first session). This routine can only be called after calling the previous<br />

routine.<br />

mplay_session_join(numb,playername) makes you join session number<br />

numb (0 is the first session). playername is your name as a player. Returns<br />

whether successful.<br />

There is one more routine that can change the session mode. It should be called before<br />

creating a session:<br />

mplay_session_mode(move) sets whether or not to move the session host<br />

to another computer when the host ends. move should either be true or false<br />

(the default).<br />

To check the status of the current session you can use the following function<br />

mplay_session_status() returns the status of the current session. 0 = no<br />

session, 1 = created session, 2 = joined session.<br />

A player can stop a session using the following routine:<br />

Players<br />

mplay_session_end() ends the session for this player.<br />

Each instance of the game that joins a session is a player. As indicated above, players have<br />

names. There are three routines that deal <strong>with</strong> players.<br />

mplay_player_find() searches for all players in the current session and<br />

returns the number of players found.<br />

mplay_player_name(numb) returns the name of player number numb (0 is<br />

the first player, which is always yourself). This routine can only be called after<br />

calling the previous routine.<br />

mplay_player_id(numb) returns the unique id of player number numb (0 is<br />

the first player, which is always yourself). This routine can only be called after

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!