lfnetwork.com mark read register faq members calendar

Thread: GetObjectByTag fail?
Thread Tools Display Modes
Post a new thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Prev Previous Post   Next Post Next
Old 01-30-2013, 06:36 PM   #1
Taunger
Rookie
 
Taunger's Avatar
 
Join Date: Oct 2010
Location: Mos Eisley
Posts: 46
Current Game: KotOR
Question GetObjectByTag fail?

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:

Code:
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 .

Last edited by Taunger; 01-30-2013 at 06:43 PM. Reason: Added info.
Taunger is offline   you may: quote & reply,
Post a new thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > GetObjectByTag fail?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:22 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.