Back To Guides

Custom Point Of No Return

This will add a custom Point Of No Return to your level to use with PointOfNoReturn Elements.

Shortcuts:

  • tweakdatapd2.lua

  • Adding the hook

    1. Create a new folder in your map folder called Hooks.
    2. Inside the Hooks folder, create a new file called tweakdatapd2.lua.
    3. Copy the following code into the level tag in your map's main.xml file.
    XML (Custom XML)
    <hooks directory="Hooks"> <hook file="tweakdatapd2.lua" source_file="lib/tweak_data/tweakdatapd2"/> </hooks>

    Lua

    Copy the following code into the tweakdatapd2.lua you created earlier:

    Lua
    Hooks:PostHook( TweakData, "_setup_point_of_no_returns", "custom_ponr", function(self) self.point_of_no_returns.(your ponr id here) = { color = Color(1, 1, 0, 0), timer_flash_color = Color(1, 1, 0.8, 0.2), attention_color = Color(1, 1, 1, 1), scale_box = true, text_id = "hud_assault_point_no_(your ponr id here)" } end)

    In the first line, change custom_ponr to something unique, for example: (your level ID)_ponr.

    Replace (your ponr id here) with your own ID, has to be unique.

    Change the color values to your liking.
    Color(RED, GREEN, BLUE, ALPHA)

    color

    Color(r,g,b,a)

    The color of the text and HUD elements.

    timer_flash_color

    Color(r,g,b,a)

    The color in which the timer flashes every second.

    attention_color

    Color(r,g,b,a)

    The color in which the box background flashes.

    scale_box

    Boolean

    Set to true to have the box scale with the text. If false, the box will have a set size.

    text_id

    String

    The string ID for the text of your PONR. Needs to be localized.
    Overkill usually uses "hud_assault_point_no_ponr id".

    * Your localized string can glitch the box if it's too long, even with scale_box = true.