lfnetwork.com mark read register faq members calendar

Thread: GetObjectByTag fail?
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 01-30-2013, 05: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 05:43 PM. Reason: Added info.
Taunger is offline   you may: quote & reply,
Old 01-30-2013, 05:43 PM   #2
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,286
Current Game: Knights of the Old Republic
Veteran Modder Helpful! 
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.


The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

Current Work in Progress: Dantooine Tension

Released Works
Blaster Pistol Enhancement
Dustil Restoration
Ebon Hawk Texture Enhancement
Gaffi Stick Improvement
Weapon Model Overhaul Texture Rework (Thanks to Toasty Fresh!)
Sunry Murder Recording Enhancement
VP's Hi Poly Tin Cans - KotOR 1 Version
Fallen Guardian is offline   you may: quote & reply,
Old 01-30-2013, 05:53 PM   #3
Taunger
Rookie
 
Taunger's Avatar
 
Join Date: Oct 2010
Location: Mos Eisley
Posts: 46
Current Game: KotOR
Woohoo! It's working!

Thanks so much for the super-fast help, Fallen Guardian!
Taunger is offline   you may: quote & reply,
Old 01-30-2013, 11:04 PM   #4
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,286
Current Game: Knights of the Old Republic
Veteran Modder Helpful! 
No problem. Glad I could help.


The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

Current Work in Progress: Dantooine Tension

Released Works
Blaster Pistol Enhancement
Dustil Restoration
Ebon Hawk Texture Enhancement
Gaffi Stick Improvement
Weapon Model Overhaul Texture Rework (Thanks to Toasty Fresh!)
Sunry Murder Recording Enhancement
VP's Hi Poly Tin Cans - KotOR 1 Version
Fallen Guardian is offline   you may: quote & reply,
Post a new thread. Add a reply to this 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 02:38 PM.

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