Uploaded notes
Uploaded notes sitting around on my HD.
This commit is contained in:
44
_notes_/Areas/InstancedAreaExample.nss
Normal file
44
_notes_/Areas/InstancedAreaExample.nss
Normal file
@@ -0,0 +1,44 @@
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
object oPC = GetPCSpeaker();
|
||||
object oBaseArea = GetObjectByTag("IFM_PC_ROOMS");
|
||||
|
||||
string sPCName = GetName(oPC);
|
||||
string sBaseResRef = GetResRef(oBaseArea);
|
||||
string sBaseName = GetName(oBaseArea);
|
||||
string sNewTag = sPCName+sBaseResRef;
|
||||
string sNewName = sPCName+"'s Room at the Flying Monkey";
|
||||
|
||||
//:: Create instanced area from player's information
|
||||
CreateArea(sBaseResRef, sNewTag, sNewName);
|
||||
|
||||
//:: Get information about new area instance
|
||||
object oNewRoom = GetObjectByTag(sNewTag);
|
||||
string sNewResRef = GetResRef(oNewRoom);
|
||||
|
||||
|
||||
location lEntry = GetLocation(GetObjectByTag("PC_ROOM_MAT"));
|
||||
|
||||
|
||||
//:: Create entry waypoint in new area instance
|
||||
CreateObject(OBJECT_TYPE_WAYPOINT, "nw_waypoint001", lEntry, FALSE, "WP_"+sNewTag);
|
||||
|
||||
//:: Make sure the area is valid
|
||||
object oTarget;
|
||||
location lTarget;
|
||||
oTarget = GetWaypointByTag("WP_"+sNewTag);
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID)
|
||||
{
|
||||
SendMessageToPC(oPC, "Warning: Area does not exist!");
|
||||
return;
|
||||
}
|
||||
//:: Move PC to instanced area.
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
AssignCommand(oPC, ActionJumpToLocation(lTarget));
|
||||
|
||||
}
|
10
_notes_/Areas/TIN01 AREAS.TXT
Normal file
10
_notes_/Areas/TIN01 AREAS.TXT
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
C:\NWN Work\NWNDS_Module\_module\are\alt_healers.are.json (1 hit)
|
||||
Line 1235: "value": "tin01"
|
||||
|
||||
C:\NWN Work\NWNDS_Module\_module\are\tyr_cw_scribe.are.json (1 hit)
|
||||
Line 332: "value": "tin01"
|
||||
|
||||
C:\NWN Work\NWNDS_Module\_module\are\urik_ad_treasury.are.json (1 hit)
|
||||
Line 2912: "value": "tin01"
|
||||
|
31
_notes_/Areas/random encounter psuedocode.txt
Normal file
31
_notes_/Areas/random encounter psuedocode.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
Psuedocode
|
||||
|
||||
Encounter Setup (trigger's onExit event)
|
||||
Create instanced encounter area from existing template.
|
||||
Move player to instanced encounter area.
|
||||
Create new marker placable on overland.
|
||||
Change tag of marker placable to "ENC_playerUUID+arearesref".
|
||||
Set new tag of marker placeable on instanced area as a string var for onAreaExit. (i.e. ENC_MARKER = "ENC_playerUUID+arearesref")
|
||||
|
||||
|
||||
Area's onEnter
|
||||
Run spawn as normal
|
||||
|
||||
Area's onExit
|
||||
Get value of string var ENC_MARKER from the Area
|
||||
If area is empty
|
||||
Delete the placable with the tag of the value of ENC_MARKER with a delay
|
||||
Run item cleanup
|
||||
Run the DestroyAreaIfEmpty function to remove the empty area.
|
||||
|
||||
|
||||
|
||||
I need a set of nwscript scripts or functions that will do the following:
|
||||
1.) Moves the PC from "Area A" to "Area B"
|
||||
2.) Places a placeable with the resref of "enc_marker" at the spot in "Area A" that the PC was originally. I think this placeable will need to be be saved as an object on the module to track it. A waypoint that is uniquely tagged in relation to the PC should be created somewhere within 3 meters of the new placeable. This waypoint should probably be stored on the module as well.
|
||||
3.) an existing placeable in "Area B" with the resref of "exit_plc" is used to exit "Area B", this needs to be linked to the new waypoint in "Area A". When anyone in "Area B" uses the placeable, it should send them back to the new waypoint in "Area A"
|
||||
4.) when "Area B" is completely empty of players, destroy it and then destroy the placeable with the resref "enc_marker" in "Area A"
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user