lfnetwork.com mark read register faq members calendar

Thread: Faction Help
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 10-31-2007, 03:50 PM   #1
Darth Essence
Rookie
 
Darth Essence's Avatar
 
Join Date: Apr 2006
Location: Latvia
Posts: 60
Faction Help

Code:
void main()
{
   object oStud1 = GetObjectByTag("n_dan_student1");
       object oStud2 = GetObjectByTag("n_dan_student3");
       object oPC = GetFirstPC();

    SendMessageToPC(oPC, "Executed");
    ChangeToStandardFaction(oStud1, 11);
    ChangeToStandardFaction(oStud2, 12);

    SendMessageToPC(oPC, IntToString(GetStandardFaction(oStud1)));
}
K1 ... This should change the Faction of oStud1 to 11 .. but the SendMessage gives me a mystical -1 Faction ... :S .. why ?


Re-Installing your computer without back-up is not a good idea ...
Darth Essence is offline   you may: quote & reply,
Old 10-31-2007, 08:13 PM   #2
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,766
Current Game: Dragon Age: Origins
Forum Veteran Helpful! Notable contributor 
// 713: GetStandardFaction
// Find out which standard faction oObject belongs to.
// * Returns a mystical INVALID_STANDARD_FACTION if oObject does not belong to
// a Standard Faction, or an error has occurred.

The only two things I can think of is that "n_dan_student1" isn't a valid tag or that the commands may need delaying.
Try inserting this after you initialize oStud1 to test the validity of your tag.
Code:
if (!GetIsObjectValid(oStud1)) 
  SendMessageToPC(oPC, "oStud1 is not valid");
If that doesn't generate an message in your feedback, try a DelayCommand of 0.2 on the ChangeToStandardFaction and a delay of 0.4 on the GetStandardFaction message line.



tk102 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 > Faction Help

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 04:59 PM.

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