StreetPASS custom script events - MeMcCree/streetpass GitHub Wiki

StreetPASS custom script events

StreetPASS adds gamemode specific script events for mappers to use. Those are handled like game events:

// Game event:
OnGameEvent_teamplay_broadcast_audio = function(params) {
    ...
}
// Script event:
OnScriptEvent_sp_swap_sides = function(params) {
    ...
}

sp_swap_sides

sp_swap_sides is called when sides were swapped.

Arguments:

  • swaper (player index) - player that swapped sides
  • swapzone (handle) - swapzone trigger handle
  • old_defense (team number) - defense team before side swap
  • old_attack (team number) - attacker team before side swap
  • ball_pos (vector) - where the ball landed

sp_pass_intercept

sp_pass_intercept is called when the ball was intercepted.

Arguments:

  • victim (player index) - who tried to pass
  • intercepter (player index) - intercepter

sp_pass_spawn

sp_pass_spawn is called when the ball was spawned.

sp_pass_splashed

sp_pass_splashed is called when the ball was splashed.

Arguments:

  • splashed (player index) - player that splashed the ball
  • old_ball (team number) - ball's team before splash

sp_protection_enabled

[UNUSED] sp_protection_enabled is called when attacker's and defender's protection is enabled.

sp_protection_disabled

[UNUSED] sp_protection_disabled is called when attacker's and defender's protection is disabled.

sp_protection_triggered

sp_protection_disabled is called when attacker's and defender's protections trigger.

Arguments:

  • team (team number) - team of the protection trigger
  • players_teleported (array) - all players (player index's) that got teleported out of the trigger

sp_blast_jump

sp_blast_jump is called when player rocket jumped or sticky jumped.

Arguments:

  • userid - player's userid
  • playsound (bool)

sp_blast_jump_landed

sp_blast_jump_landed is called when player landed after rocket jump or sticky jump.

Arguments:

  • userid - player's userid