Neverwinter Nights > Script Request

Disabling the Map

(1/1)

420:
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: ---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());
        }
}

--- End code ---

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: ---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));
        }
}

--- End code ---

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) {

Navigation

[0] Message Index

Go to full version