Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Waypoint / Mapnote question

Page: 1 of 1
 Seamhainn
01-31-2008, 3:57 PM
#1
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
 Stream
01-31-2008, 4:50 PM
#2
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
 Seamhainn
02-01-2008, 12:41 AM
#3
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
 Stream
02-01-2008, 2:38 AM
#4
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
 Seamhainn
02-01-2008, 11:24 AM
#5
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?
 stoffe
02-02-2008, 6:54 AM
#6
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.
 Seamhainn
02-02-2008, 7:06 AM
#7
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!
Page: 1 of 1