Original War Support Bug Tracker
Please log in to bookmark issues
OPEN  Feature request #419  -  Make it possible to call functions (or some type of functions) directly in game ("Function maker" with SGUI), if the map allows it // and add "GetCursorX" and "GetCursorY" functions.
Posted Sep 15, 2017 - updated Sep 15, 2017
Issue details
  • Type of issue
    Feature request
  • Status
  • Assigned to
    Not assigned to anyone
  • Progress
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
  • Owned by
    Not owned by anyone
  • Estimated time
    Not estimated
  • Time spent
    No time spent
  • Category
    Not determined
  • Priority
    Not determined
  • Targetted for
    icon_milestones.png Not determined
Issue description
This feature request would be useful for some mods, like the SANDBOX multiplayer mod.

Whether it is thanks to the chat or any other type of work, SGUI included, make it possible to call a function with a given value. For instance, we would love to use this in our multiplayer games:


'dialog5' would be the value the player choses by himself. He would be free to type this value in a text box that could perhaps be implemented with SGUI. The reason to this is to avoid making 999,999,999 buttons for the same function, because obviously we want to use more than one sound.

In SGUI you could add a special window called "Function maker" with three two buttons. In the first one, it would be a list of the available functions the players can choose (the modder would be able to tell which function they can pick in a new settings file located in the maps folder to avoid any form of cheating).

The second button would be the parameters.

For instance, the player opens "Function maker" and selects "PlaySound" function. The SGUI detects PlaySound and prepares the text box dedicated to this function. PlaySound needs three parameters, so it allows the player to use three parameters. The player can write the parameters directly in the text box, or can choose the parameters from a list (like they did to pick the function, but in that case the modder also has to specify which parameters are available to pick).

Make it possible to use GetCursorX and GetCursorY to make it easier for players to use the "Function Maker" window.

In the end, the player could end up with a function like this "PlaySoundXY(GetCursorX,GetCursorY,'dialog5');"

This could be used for other uses as long as the modder allows some sort of liberty, originality and fun to his maps. For instance, if the modder allows it on his map: - Create crates, units, buildings at the cursor location ; - PlaceSeeing at cursor location - PlaceEnvironment - etc.

There are no comments