Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

WAYPOINTS BY DM CREATOR PANEL - HOW DOES IT WORK?

Korden_79Korden_79 Member Posts: 1
edited May 2018 in Builders - Scripting
In the Creator Panel for DM which appears in game there is a line named "waypoint".

If you double click on it, it allows you to put a "input waypoint name" and to place the resulting object in the area.

The issue is, what are you creating? A Waypoint with this tag? and why it is not recognised by the game?

For example, if you create an item whose specific function is teleport to "ORKY" Waypoint, if the ORKY waypoint is already in the area (located in the module creation) it does work, but if you try to create the ORKY in game (putting ORKY in the waypoint input name) it does not work.

Can you please help me? my purpose is creating directy in game waypoints which can be recognised and used by teleport functions.




Comments

  • ShadowMShadowM Member Posts: 502
    edited May 2018
    In my testing it not even creating a waypoint, it would update the list of waypoint in the area.
    It might be just droping down the standard waypoint (tag NW_WAYPOINT001) and you just naming it (not naming the tag) you would need to make a script that cycled waypoints in the area. (I would classify this as a experimental feature). It might be better to do scripting version until it updated.

  • OldFriendlyFireOldFriendlyFire Member Posts: 4
    edited May 2018
    Perhaps a better solution is to script this on to a DM widget and code it. E.g. go into the toolset and make a wand (miscellaneous-crafting/tradeskill material-Magic Wand). Give it a tag that works for you. e.g. dm_wand. Assign it the property Cast Spell: Unique Power [Unlimited Uses / Day].

    Create a script with the same name as the item tag (in this case dm_wand):

    #include "x2_inc_switches" void main() { if(GetUserDefinedItemEventNumber() == X2_ITEM_EVENT_ACTIVATE){ object oPC = GetItemActivator(); string sWPTag = GetPCChatMessage(); location lTargetLoc = GetItemActivatedTargetLocation(); object oNewWP = CreateObject(OBJECT_TYPE_WAYPOINT, "nw_waypoint001", lTargetLoc, FALSE, sWPTag); SendMessageToPC(oPC, "Created: " + GetName(oNewWP)); SendMessageToPC(oPC, "Tag: " + GetTag(oNewWP)); } SetExecutedScriptReturnValue(X2_EXECUTE_SCRIPT_END); }

    Assuming you have not messed with any of the standard tag based script settings, you are now good to go, just whisper the name of the waypoint and use the wand where you want it. Obviously you could add a lot of functionality to this to make your life easier; click on NPC first to automatically set up the WP tag, auto-increment WP tag IDs etc. And you probably want to add a GetIsDM check at the start to stop any naughty players abusing a wand you have dropped by accident.... and a GETPCChatSpeaker to prevent picking up some random chat elsewhere.

    dTddunahan
Sign In or Register to comment.