All public logs
Jump to navigation
Jump to search
Combined display of all available logs of Soldat2 Wiki. You can narrow down the view by selecting a log type, the username (case-sensitive), or the affected page (also case-sensitive).
- 13:21, 2 February 2023 AL talk contribs created page Scripting Examples (Created page with "This page contains a selection of unofficial scripts to demonstrate the usage of various aspects of Soldat 2's scripting API. == Team Balancer == <syntaxhighlight lang="C#"> // a basic team-balancing script to illustrate how to implement simple // chat-commands using S2 scripting // 'using' directives let you omit namespacing // eg: Player rather than the full Teal.Player using System.Collections; using System.Collections.Generic; using UnityEngine; using Teal; [Disal...")
- 14:15, 17 January 2023 AL talk contribs created page User:AL (Created page with "== Scripting Notes == The exact limits of what scripting in Soldat 2 can do is not yet known, but it already looks to far exceed what was possible in Soldat 1. The following is a somewhat random assortment of different ways to affect or read the game state from scripting. === Messaging === * <code>GameChat.ChatOrLog(string message)</code> print a chat message * <code>HUD.Get.Notify(string message, UnityEngine.Color c)</code> text printout similar to flag grabbed/returne...")
- 15:04, 16 January 2023 AL talk contribs created page Scripting Events (Created page with "The main method for reacting to gameplay events in Soldat 2 scripting is by registering ''listeners''. This is done by calling the <code>AddListener()</code> function, usually on the <code>Eventor</code> object. In the case of Eventor listeners, you will need to specify both the event type to listen for, as well as a function to be called when the event occurs. Callback functions should have the signature <code>void cb_func(IGameEvent)</code>. The event types that are u...")
- 12:51, 16 January 2023 AL talk contribs created page Category:Scripting (Created page with "Pages related to scripting in Soldat 2")
- 11:17, 16 January 2023 AL talk contribs created page Scripting Introduction (Created page with "Scripting in Soldat 2 is done in a Unity/C# environment. For a script to be usable in-game, the script file must be placed under <code>Soldat2/Scripts/</code> and there needs to be a ruleset that specifies that script in the <i>GameScript</i> object in its json - for example, see <code>Soldat2/Rules/Standard/Climb.json</code>. The script can be tested by starting a game that uses that ruleset.")
- 08:56, 16 January 2023 User account AL talk contribs was created