file PlatinumQuest .mis mod callbacks

  • HiGuy
  • HiGuy's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • At college, may not be around
More
13 Jul 2017 21:07 - 13 Jul 2017 21:08 #1 by HiGuy
PlatinumQuest .mis mod callbacks was created by HiGuy
There are a bunch of functions you can use in your .mis file to do code routines at various points. These are reset on mission load and you can override them without causing any conflicts. Here's a list of the callbacks:


Client Callbacks:

function clientCbOnOutOfBounds() {}
Called when you go out of bounds.

function clientCbOnRespawn() {}
Called when you respawn on the startpad, or a trigger in a hunt match.

function clientCbOnRespawnOnCheckpoint() {}
Called when you respawn on a checkpoint.

function clientCbOnActivateCheckpoint() {}
Called when you activate a new checkpoint.

function clientCbOnPlayerJoin() {}
Called when a player joins the server you're on.

function clientCbOnPlayerLeave() {}
Called when a player leaves the server you're on.

function clientCbOnMissionLoaded() {}
Called when the mission finishes loading.

function clientCbOnMissionEnded() {}
Called right before the mission is unloaded.

function clientCbOnMissionReset() {}
Called when the mission resets, this mostly for restarts.

function clientCbOnRestartLevel() {}
Called when the mission is explicitly restarted (via button or oob).

function clientCbOnEndGameSetup() {}
Called before the end game screen is shown.

function clientCbOnHuntGemSpawn() {}
Called when a set of gems spawns in a hunt match.

function clientCbOnFrameAdvance(%delta) {}
Called every frame, %delta is the frame time in milliseconds.


Server Callbacks

function serverCbOnMissionLoaded() {}
Called when the mission finishes loading.

function serverCbOnMissionEnded() {}
Called right before the mission is unloaded.

function serverCbOnMissionReset() {}
Called when the mission resets, this mostly for restarts.

function serverCbOnEndGameSetup() {}
Called before the end game screen is shown.

function serverCbOnOutOfBounds() {}
Called when a client on the server goes out of bounds.

function serverCbOnRespawn() {}
Called when a client on the server respawns.

function serverCbOnFrameAdvance(%delta) {}
Called every frame, %delta is the frame time in milliseconds.


In general you should use the server callbacks (especially if it's a multiplayer map) for map logic and map-global events. Client callbacks are better for interface updates.

PQ in a nutshell
function clientcmd12dothepq() {
    commandToClient(LocalClientConnection, '34onthedancefloor');
}
Last edit: 13 Jul 2017 21:08 by HiGuy. Reason: Formatting
The following user(s) said Thank You: Regislian, Weather

Please Log in or Create an account to join the conversation.

  • Evoker
  • Evoker's Avatar
  • Offline
  • Experienced Marbler
  • Experienced Marbler
  • Aspiring to inspire
More
17 Jul 2017 22:01 #2 by Evoker
Replied by Evoker on topic PlatinumQuest .mis mod callbacks
Can these be used for custom levels? Like if you want something to happen after someone does one of these things?

Please Log in or Create an account to join the conversation.

  • Weather
  • Weather's Avatar
  • Offline
  • Professional Marbler
  • Professional Marbler
More
17 Jul 2017 22:34 #3 by Weather

Please Log in or Create an account to join the conversation.

  • HiGuy
  • HiGuy's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • At college, may not be around
More
18 Jul 2017 01:42 #4 by HiGuy
Replied by HiGuy on topic PlatinumQuest .mis mod callbacks
Slight change coming to these in 2.0.13, serverCbOnOutOfBounds and serverCbOnRespawn will now take a %client arg (duh).

PQ in a nutshell
function clientcmd12dothepq() {
    commandToClient(LocalClientConnection, '34onthedancefloor');
}

Please Log in or Create an account to join the conversation.

Moderators: Kalle29AayrlRegislian