Jump to content

Home

Script Assistance Needed


brwarner

Recommended Posts

Hiya brwarner,

Im not so good at this scripting and modding myself, but maybe we can figure this out. But what is it your trying to do not sure about?

 

Is there a way to find the position of an object like your cuurent position in a script. I know you can because of the Where am i armband does it.

 

Do you mean while your in game? or while your using the KT tools ? or something else to mod with ?

Link to comment
Share on other sites

while in game i want to find position of object and say it in dialog.

 

I sent Darth333 the source scripts, plus a small beta version of an armband that shows the postion vector coordenants in a dialogue one liner. She'll implement it into her next whereami armband, and should have it ready for the public real soon...

Link to comment
Share on other sites

^^^^

I didn't see that part, so try this:

void main()
{
   vector vVec = GetPosition(oCreature);    // Don't forget to declare oCreature

   // Edit
   string sVec = "(" + FloatToString(vVec.x)+ ", " + FloatToString(vVec.y)+ ", " + FloatToString(vVec.z) + ")";
   SendMessageToPC(GetFirstPC(), sVec);
}

***Edit***

Does anyone know if 'ActionSpeakString()' works in KotOR?

Link to comment
Share on other sites

^^^^

I didn't see that part, so try this:

void main()
{
   vector vVec = GetPosition(oCreature);    // Don't forget to declare oCreature

   // Edit
   string sVec = "(" + FloatToString(vVec.x)+ ", " + FloatToString(vVec.y)+ ", " + FloatToString(vVec.z) + ")";
   SendMessageToPC(GetFirstPC(), sVec);
}

***Edit***

Does anyone know if 'ActionSpeakString()' works in KotOR?

 

No, ActionSpeakString() will not work because of int ShipBuild() was used to disable all debug output messaging for the retail build of SWkotor and Unfortunantly there is no known function command in nwscript that can set or re-enable debugging. The developers didn't want any debug message showing up from AI scripts by accident and of course instead of going into each script from every module and commenting out the speakstrings, barks, posts,and logging, they just created "int ShipBuild()" an arguement that would redifine the debug mode as disabled in the executable file.

Link to comment
Share on other sites

Just a suggestion:

 

Use Darth333's 'Where am I Band'!

 

1. In game, goto a location close to the object in question, click on the 'Where am I Band'.

2. Write down the X and Y coordinates.

3. Use a .git editor, and open the module's .git file.

4. Go into the placeable's catagory, and try to match up the X and Y coordinates.

5. When you find a matching set, that is your object in question.

 

Crude but effective...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...