Author Topic: Disabling the Map  (Read 4646 times)

Offline 420

  • Hero Member
  • *****
  • Posts: 4087
    • View Profile
    • Email
Disabling the Map
« on: March 04, 2008, 06:27:50 PM »
Here is a fun little script that will effectively disable the PC's in-game mini-map. Cuchulann and I have been discussing this for a maze area but I never got around to writing it.

Suggested by me, written by Fester Pot and edited by lv8pv:

"Maze" Area OnEnter Script
Code: [Select]
void main()
{
        //Place in AREAS OnEnter script
        // Idea from 420 BioBoards
        // http://nwn.bioware.com/forums/viewtopic.html?topic=496541&forum=47
        if (GetIsPC(GetEnteringObject()) == TRUE) {
                 ExecuteScript("pchb", GetEnteringObject());
        }
}

Pseudo-Heartbeat Script (No Event Trigger.)
Must be named "pchb"
"Add a LocalInt to each area you would like to hide the map. Call that int "hidemap" and set it = TRUE for all the areas that should have a hidden minimap." -lv8pv
Code: [Select]
void main()
{
        // Idea from 420 BioBoards
        // http://nwn.bioware.com/forums/viewtopic.html?topic=496541&forum=47
        //Declare and define the executing object as the PC
        object oPC = OBJECT_SELF;
        //Declare and define the current area
        object oArea = GetArea(oPC);
        if (GetLocalInt(oArea, "hidemap") == TRUE) {
            ExploreAreaForPlayer(oArea, oPC, FALSE);
            DelayCommand(0.5, ExecuteScript("pchb", oPC));
        }
}

This code hasn't been tested yet so it may be updated if errors are found.

-420

EDIT: 3/5/08 fixed code:

"if (GetIsPC(GetEnteringObject) == TRUE) {"

to

if (GetIsPC(GetEnteringObject()) == TRUE) {
« Last Edit: March 05, 2008, 06:49:04 PM by 420 »