Conditional Out of Bounds (kHacker35000vr)

From Custom Mario Kart
Jump to navigation Jump to search
This article is about kHacker35000vr's cheat code. For other cheat codes with the same name, see Conditional Out of Bounds.

This is a cheat code created by kHacker35000vr. This 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. As of build 25, LE-CODE implemented it too.

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

The code has to be activated by changing the route setting of AREAs to 1. Other values disable the code completely. In KMP Cloud, the required value is 0x100 because it does not show the parameters correctly.

There are distributions that support both this and the Riidefi's COoB cheat. Therefore the executing code (e.g. LE-CODE) must know which cheat to use. Therefore the value for the route should be set to 1 if you use this cheat.

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 == 0 && playerInfo->currentKcp == area->setting2) //Activator
        return areaId;
    else if (area->setting1 == 1 && playerInfo->currentKcp != area->setting2) //Deactivator
        return areaId;
        return -1;

Cheat Codes

Conditional OoB v1.1, PAL

Conditional OoB v1.1, NTSC-U

Conditional OoB v1.1, NTSC-J