Jump to content

Home

GetObjectByTag fail?


Taunger

Recommended Posts

Hi!

 

I'm having trouble in scripting. The script I'm working on obviously does more than I show here, but this covers my issue:

 

void main() {

object oPC = GetFirstPC();

ActionPauseConversation();

object oDavik = GetObjectByTag("tar08_davik081");
object oCalo = GetObjectByTag("tar08_calo081");

if (GetIsObjectValid(oDavik)) {
	SendMessageToPC(oPC, "oDavik is valid.");
} else SendMessageToPC(oPC, "oDavik is invalid.");

if (GetIsObjectValid(oCalo)) {
	SendMessageToPC(oPC, "oCalo is valid.");
} else SendMessageToPC(oPC, "oCalo is invalid.");

ActionResumeConversation();

}

 

I got the tag values from m08aa.git, which is part of the RIM file for Davik's Estate, where they're stored as a RESREF value (there is no "Tag" label for Davik and Calo).

 

Every time I run this in the feedback screen I see "oDavik is invalid" and "oCalo is invalid". I assume this happens because I'm not using the right tag values in the GetObjectByTag functions. However, I don't know where else besides the GIT file to look for the right tags... I get a feeling I'm being terribly noobish here and there is an obvious solution. Or so I hope.

 

Any help would be appreciated! :)

 

Edit: by the way, this is a script that runs during the second node of the first dialog in that module, when Davik and Calo clearly do exist :p.

Link to comment
Share on other sites

You have to get the tag from the creature's actual UTC file, which - in your case - can be found in KotOR tool through the following path.

 

Kotor 1 - RIMs - Modules - tar_m08aa_s.rim - Blueprint, Character - tar08_davik081.utc and tar08_calo081.utc

 

There is a second variation of UTC files for both Calo and Davik, so I'd assume one is for when you first see them in the opening cutscene in Davik's base and one is for when you when fight them.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...