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.

Need help for a script

Page: 1 of 1
 Fastmaniac
01-29-2011, 5:26 PM
#1
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();
}
 LDR
01-29-2011, 5:39 PM
#2
Maybe you can just attach a waypoint?
 Fastmaniac
01-29-2011, 5:53 PM
#3
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.
 Qui-Gon Glenn
01-29-2011, 8:38 PM
#4
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....
Page: 1 of 1