Hello!
Is it possible that a Mapnote only is shown after something happened (a GlobalNumber has a certain value for example) and otherwise is not shown on the map?
Thanks and take care
There's two ways of doing this both involving scripts, first you could attach the script to a dialog where the global will be set;
void main()
{
CreateObject(OBJECT_TYPE_WAYPOINT, "WP_TAG", Location(Vector(x, y, x), 0.0));
}
The other way is to use it in the OnEnter script, first rename the original OnEnter script to something like 2OnEnter.ncs, then compile this script and save it as the filename of the original on enter script;
void main() {
if ((GetGlobalNumber("GLOBAL_STRING")==##))
{
CreateObject(OBJECT_TYPE_WAYPOINT, "WP_TAG", Location(Vector(x, y, x), 0.0));
ExecuteScript("RENAMED_ONENTER", OBJECT_SELF, 1002);
}
else {
ExecuteScript("RENAMED_ONENTER", OBJECT_SELF, 1002);
}
}
Hope this helps
--Stream
There's two ways of doing this both involving scripts, first you could attach the script to a dialog where the global will be set;
void main()
{
CreateObject(OBJECT_TYPE_WAYPOINT, "WP_TAG", Location(Vector(x, y, x), 0.0));
}
Snip!
Hope this helps
--Stream
Thanks again, DS!
But Waypoints have certain entries in the .git file which decide wether or not they appeare on the map with their corresponding name(s). How is that handled?
Thanks and take care
It's in the .utw file isn't it? There's settings there that says waypoint has map note, map note enabled and then the details.
--Stream
It's in the .utw file isn't it? There's settings there that says waypoint has map note, map note enabled and then the details.
--Stream
Ah, I only managed that stuff via the .git file. I will have a look into it.
Thanks again!!!
void main()
{
CreateObject(OBJECT_TYPE_WAYPOINT, "WP_TAG", Location(Vector(x, y, x), 0.0));
}
DS, when compiling your script it it is asked for (I assum) declarations for Location and Vector (?). Can you help, please?
Hello!
Is it possible that a Mapnote only is shown after something happened (a GlobalNumber has a certain value for example) and otherwise is not shown on the map?
You can do this from a script using the SetMapPinEnabled() function. Pass the map marker waypoint as the first parameter to this function, and set the second to TRUE to show the map note or FALSE to hide it.
I have this script:
void main()
{
object oTarget;
object oSpawn;
object oSpawn1;
object oSpawn2;
object oSpawn3;
object oSpawn4;
object oSpawn5;
object oSpawn6;
object oSpawn7;
object oSpawn8;
location lTarget;
oTarget = GetWaypointByTag("kas25ab_spwnevil");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "kas25_sithevil", lTarget);
oSpawn8 = CreateObject(OBJECT_TYPE_CREATURE, "kas25_terant01", lTarget);
oSpawn4 = CreateObject(OBJECT_TYPE_CREATURE, "kas25_katarn04", lTarget);
oSpawn5 = CreateObject(OBJECT_TYPE_CREATURE, "kas25_katarn04", lTarget);
oSpawn6 = CreateObject(OBJECT_TYPE_CREATURE, "kas25_katarn04", lTarget);
oSpawn7 = CreateObject(OBJECT_TYPE_CREATURE, "kas25_katarn04", lTarget);
oSpawn1 = CreateObject(OBJECT_TYPE_CREATURE, "kas25_tach01", lTarget);
oSpawn2 = CreateObject(OBJECT_TYPE_CREATURE, "kas25_tach01", lTarget);
oSpawn3 = CreateObject(OBJECT_TYPE_CREATURE, "kas25_tach01", lTarget);
SetGlobalNumber("test_test", 3);
SetMapPinEnabled(oTarget, 1);
}
The .git file is set up for showing the mapnote except that MapNoteEnabled is set to 0. Unfortunately the mapnote does not show up after this script fires. And that the scripts fires is evident as the npcs all show up...
Help, please!