ExploreAreaForPlayer(object, object)
Reveals the entire map of an area to a player.
void ExploreAreaForPlayer( object oArea, object oPlayer );
Parameters
oArea
The map of an area to reveal.
oPlayer
The player to reveal the area map to.
Description
Reveals the entire map of oArea to oPlayer.
Remarks
Once an area on the map has been revealed, there is no way to hide it again.
oPlayer doesn't have to be in oArea to reveal it. Also note that it happens instantly, and so it suddently happening in a fog-bound cave when they step on a trigger without warning is probably a bit confusing.
The most useful aspect of this is exploring a well known area, such as a city, or exploring an area in the OnEnter of an area, if they have the map for the area (as done in the Original Bioware Campaign).
Note there is no way to uncover specific parts of the map (apart from jumping the players to that location to reveal it naturally), and as noted above, no way to hide it either (except by the use of a new area).
Version
1.22
Example
// if this code were placed in the OnEnter event // of an area, the entire map would be revealed to the player // even if they have never been there before. void main() { object oPlayer = GetEnteringObject(); if (GetIsObjectValid(oPlayer) && GetIsPC(oPlayer)) { // As this is firing in the Area's own events, we explore this // area's area. GetArea() might not always work, but this is fine anyway object oArea = OBJECT_SELF; ExploreAreaForPlayer(oArea, oPlayer); } }
See Also
categories: | Area Functions |
author: Brett Lathrope, editor: Jasperre, additional contributor(s): Charles Feduke, Jasperre
Send comments on this topic.