Here is the list of multiplayer script functions (they can be used in singleplayer maps too), as requested
They are not documented yet, sorry.
---------------------------------------------
DisableCameraFollowHeroesForPlayers
MessageBoxForPlayers
MoveCameraForPlayers
Play2DSoundForPlayers
Play3DSoundForPlayers
QuestionBoxForPlayers
SetAmbientLightForPlayers
StartCutSceneForPlayer
StartDialogSceneForPlayers
--------------------------------
These are analogs for singleplayer functions (corresponding SP functions won't work correctly or work at all in MP maps). They are only different in that they have an additional first parameter, PlayerFilter. This constant is defined in advmap-startup.lua:
PLAYERFLT_1 = 1
PLAYERFLT_2 = 2
PLAYERFLT_3 = 4
PLAYERFLT_4 = 8
PLAYERFLT_5 = 16
PLAYERFLT_6 = 32
PLAYERFLT_7 = 64
PLAYERFLT_8 = 128
PLAYERFLT_ALL = 255
PLAYERFLT_TEAM_1 = -1
PLAYERFLT_TEAM_2 = -2
PLAYERFLT_TEAM_3 = -3
PLAYERFLT_TEAM_4 = -4
PLAYERFLT_TEAM_5 = -5
PLAYERFLT_TEAM_6 = -6
PLAYERFLT_TEAM_7 = -7
PLAYERFLT_TEAM_8 = -8
For example, to show message to first player only, you should write:
MessageBoxForPlayers(PLAYERFLT_1,GetMapDataPath().."mymessage.txt").
To show a message to 1 and 3 players, write: MessageBoxForPlayers(PLAYERFLT_1+PLAYERFLT_3,GetMapDataPath().."mymessage.txt"), or simply MessageBoxForPlayers(5,GetMapDataPath().."mymessage.txt").
(NB: team constants can NOT be summed like that)
-------------------------------
These function are useless in singleplayer but can come in handy in MP:
GetTurnTimeLeft(Player)
IsPlayerCurrent(Player)
IsPlayerInGhostMode(Player)
IsPlayerLost(Player)
IsPlayerWaitingForTurn(Player)
IsTeamCurrent(Player)
Names are self-explanatory, I believe.
----------------
P.S. Devs say these functions will be fully documented in patch 3.1.
[h5] Multiplayer script functions - the list
mp script functions
Where is the info on the new multiplayer script functions? I have installed patch 3.1 and read the readme file but have not found any mention of them anywhere....
Ach wie schoen das niemand weiss....
@ Ashreea -- I think you are right.
@ Sarvi -- I managed to get a few of them working in my Gang of Two map using trial and error. You might wish to look at its script for ideas.
@ Sarvi -- I managed to get a few of them working in my Gang of Two map using trial and error. You might wish to look at its script for ideas.
rdeford, Mage Of Soquim
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
re- multiplayer script functions
Thanks guys!
I don't have any problems (yet!). The filters were explained nicely by Franzy earlier in this forum.
I've studied the 'Gang of Two' script too (playing the map at the moment), which is i believe the first scripted multiplayer map...Ground-breaking work ,Mage of Soquim!!
I don't have any problems (yet!). The filters were explained nicely by Franzy earlier in this forum.
I've studied the 'Gang of Two' script too (playing the map at the moment), which is i believe the first scripted multiplayer map...Ground-breaking work ,Mage of Soquim!!
Ach wie schoen das niemand weiss....
Who is online
Users browsing this forum: No registered users and 0 guests