Heyo,
I'm currently working on a Recruitment Mod which is nearly completed by now (Only things left to do are VOs and Betatesting). Now I wanted to have the mod start earlier in the game so I started by changing the location of the character to spawn and attaching the script to a conversation. Then I wanted the NPC to walk to the location of the PC. So, my Problem is: When the scripts are triggered the conversation stops. The Spawn script is triggered correctly but the walking script doesn't work. The script worked fine in the conversation on Dantooine. Maybe someone here can help me spot the mistake.
Thanks for helping
Spawn script:
void main()
{
float x = 185.75;
float y = 116.26;
float z = 0.0;
float r = 0.0;
vector vCre = Vector(x, y, z);
location lCre = Location(vCre, r);
object oCre = CreateObject(OBJECT_TYPE_CREATURE, "n_lok_spwn", lCre);
}
Walking script:
void main(){
ActionPauseConversation();
ActionWait(2.0);
object oObject = GetObjectByTag("n_lokana",1);
object oPC = GetFirstPC();
location lLoc = GetLocation(oPC);
AssignCommand(oObject, ActionMoveToLocation(lLoc, 1));
ActionResumeConversation();
}
Maybe you can just attach a waypoint?
I don't know... I'm not that experienced in waypoints and such things... That's why I wanted to keep it simple. I used the original script "k_punk_finale10" to create the walk script. But since a waypoint is an object I thought it shouldn't make a difference.
object oCre = CreateObject(OBJECT_TYPE_CREATURE, "n_lok_spwn", lCre);
Is "n_lok_spwn" a tag or a script? I would think it is a tag, and it must be if it compiles and spawns properly as you say... just the name confuses me a little.
If it is a tag for your npc, then your walking script would seem to be calling a "different" creature... as the tag there is "n_lokana".
Not sure what it is worth....