Conditional Out of Bounds (kHacker35000vr)

From Custom Mario Kart
Revision as of 10:50, 9 July 2020 by KHacker35000vr (talk | contribs) (Created page with "'''Conditional out of bounds''' is a cheat code created by KHacker35000vr that makes it easier for track authors to implement intersections without having t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Conditional out of bounds is a cheat code created by KHacker35000vr that makes it easier for track authors to implement intersections without having to worry about unintended fall boundaries being triggered when someone on the lower part of the track gets too much air. It makes use of the unused AREA type 10 which will serve as the conditional out of bounds.

Track creators can implement a conditional out of bounds by changing setting 1 of the AREA to either 1 or 2. Value 1 will only enable the AREA if the condition is met, while value 2 will disable the AREA if the condition is met. Setting 2 of the AREA defines a key checkpoint region. If a player currently is inside the given key checkpoint region, the condition is true. Because it is recommended to never place key checkpoints on intersections, as this may caue position bugs, the code does not require specific checkpoint setups to work properly and authors can freely alter checkpoints without having to worry too much.

C code

The following code snippet demonstrates how the current key checkpoint and the AREA settings determine if a fall boundary is active.

    if (area->setting1 == 1 && playerInfo->currentKcp == area->setting2) //Activator
        return areaId;
    else if (area->setting1 == 2 && playerInfo->currentKcp != area->setting2) //Deactivator
        return areaId;
    else
        return -1;

Cheat Codes

Conditional OOB, PAL

Conditional OOB, NTSC-U

Conditional OOB, NTSC-J