Script callbacks

Moderator: NADEO

User avatar
w1lla
Posts: 2396
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: Script callbacks

Post by w1lla »

Strange... Seems to be fixed Never mind my post then....

Had some issues with MatchStart as Callback but fixed it eventually.
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
User avatar
w1lla
Posts: 2396
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: Script callbacks

Post by w1lla »

New Callback:

Code: Select all

LibStats_GetWeaponsHasHit
Missing.
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
User avatar
Eole
Nadeo
Nadeo
Posts: 1265
Joined: 26 Apr 2011, 21:08

Re: Script callbacks

Post by Eole »

The list of methods and callbacks available in the Nadeo scripts is also on the ManiaPlanet GitHub documentation now :
http://maniaplanet.github.io/documentat ... ripts.html
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
User avatar
steeffeen
Translator
Translator
Posts: 2472
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: Script callbacks

Post by steeffeen »

so elite will keep being weird and different than ANY other mode causing more work for controller authors and unnecessary network usage?
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks
    User avatar
    w1lla
    Posts: 2396
    Joined: 15 Jun 2010, 11:09
    Location: Netherlands
    Contact:

    Re: Script callbacks

    Post by w1lla »

    For elite its not aproblem just a way to code properly for authors
    TM² Info
    SM Info
    QM Info

    OS: Windows 10 x64 Professional
    MB: MSI 970A-G46
    Processor: AMD FX-6300 3500 mHz
    RAM Memory: 16 GB DDR3
    Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
    KB: Logitech G510s
    Mouse: Logitech G300s
    Mode Creation
    ManiaScript Docs
    User avatar
    Eole
    Nadeo
    Nadeo
    Posts: 1265
    Joined: 26 Apr 2011, 21:08

    Re: Script callbacks

    Post by Eole »

    Elite already uses some generic callbacks and methods.

    Callbacks:
    LibXmlRpc_LoadingMap
    LibXmlRpc_BeginMatch
    LibXmlRpc_BeginMap
    LibXmlRpc_BeginSubmatch
    LibXmlRpc_BeginRound
    LibXmlRpc_BeginTurn
    LibXmlRpc_EndTurn
    LibXmlRpc_EndRound
    LibXmlRpc_EndSubmatch
    LibXmlRpc_EndMap
    LibXmlRpc_EndMatch

    Methods:
    LibXmlRpc_DisableAltMenu
    LibXmlRpc_EnableAltMenu
    LibXmlRpc_GetScores

    In the next version the following callbacks will be added:
    LibXmlRpc_BeginWarmUp
    LibXmlRpc_EndWarmUp
    LibXmlRpc_OnHit
    LibXmlRpc_OnArmorEmpty
    LibXmlRpc_OnPlayerRequestRespawn
    LibXmlRpc_OnCapture
    LibXmlRpc_OnShoot
    LibXmlRpc_OnNearMiss

    There will be a new setting S_UseLegacyCallback to turn on or off the old callbacks (by default they'll be turned on).
    But as the new callbacks are generic, they will have far less informations about the events than the legacy ones.
    Contribute to the ManiaPlanet documentation on GitHub
    A question about ManiaScript? Ask it here!
    User avatar
    steeffeen
    Translator
    Translator
    Posts: 2472
    Joined: 14 Oct 2012, 16:22
    Location: Germany

    Re: Script callbacks

    Post by steeffeen »

    okay my bad then, i wasn't aware that the new callbacks are available as well
    good thing about being able to turn off the old (huge) ones :thumbsup:
      Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

      ManiaControl, FancyManiaLinks
      User avatar
      Eole
      Nadeo
      Nadeo
      Posts: 1265
      Joined: 26 Apr 2011, 21:08

      Re: Script callbacks

      Post by Eole »

      In which mode did you try? Currently it only works on Elite (version >= 2013-07-07), the other modes will be supported with the next update.

      When I do my test I call something like that in my controller:

      Code: Select all

      client.query('TriggerModeScriptEvent', ['WarmUp_Stop', '']);
      
      Then a "Warm up stop" message is displayed in the chat and the warm up stops immediately. If the match can't begin (because there's not enough players, ...) a new warmup starts but If all is ok, the match begins.
      Contribute to the ManiaPlanet documentation on GitHub
      A question about ManiaScript? Ask it here!
      Post Reply

      Return to “Dedicated Server”

      Who is online

      Users browsing this forum: No registered users and 1 guest