Events on in game actions

Post here every finished plugin

Moderator: NADEO

Post Reply
beauchette
Posts: 26
Joined: 19 Sep 2011, 11:21

Events on in game actions

Post by beauchette »

Hi,

I've been searching through manialive's documentation, and I didn't find any event for hits, pole captured or eliminations in shootmania storm, can anyone tell me if these events exist, or not ?
reaby
Posts: 1032
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: Events on in game actions

Post by reaby »

Manialive has special callback event for Scriptmode. So if the script sends events you can get them using

Code: Select all

/** Callback function to get Scriptmode Event and parameters
* @var string $event
* @var string $args
*/
public function onModeScriptCallback($event, $args ) {

// do your code here

}

Unfortunately, Storm default scripts doesn't - even now as we have asked many times - trigger any callbacks. So you have to modify the scripts to emit some signals.

For pole capture you can use following maniascript snipplet for the .script.txt file:

Code: Select all

XmlRpc.SendCallback("poleCapture", Players[PlayerId].Login);
and for armor empty

Code: Select all

XmlRpc.SendCallback("emptyArmor", Event.Victim.Login);
See Foxcontrol, Smart or MLepp for Storm modified scripts, use them directly or do your own implementations.
Post Reply

Return to “ManiaLive Plugins”

Who is online

Users browsing this forum: No registered users and 0 guests