lfnetwork.com mark read register faq members calendar

Thread: Scripting 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 06-17-2009, 01:53 AM   #1
TriggerGod
Senior Member
 
TriggerGod's Avatar
 
Join Date: Mar 2008
Location: hiding
Posts: 2,415
Helpful! 
Scripting help

At this moment, I am working on some quests, and I need to learn some more scripting, so bear with me. All these scripts would be for TSL.

1) How would I go about making a party member the leader, and setting it back to having your PC as the leader at a later time? (Like the bar fight on Nar Shaddaa between Atton and the Twin Suns, and Mira going through the Jekk Jekk Tar)

2) Would it be possible to check which party members are in your party as you enter a new area? To be more specific, how would I check if Brianna was in your party as you entered the tomb on Korriban?

3) How would I set up a wave of enemies, similar to the waves upon waves of Dark Jedi on the Star Forge?
TriggerGod is offline   you may: quote & reply,
Old 06-17-2009, 02:42 AM   #2
Star Admiral
N7 Commando
 
Star Admiral's Avatar
 
Join Date: Oct 2008
Location: Omega 4 Relay
Posts: 656
Current Game: Mass Effect 2
Folder extraordinaire Helpful! 
Not too sure about the first question. You could give a look at the SetPartyLeader() function though.

For the second, you can use the following script:
Code:
int StartingConditional() {
   int i = 0;
   while( i < 3 ) {
   if( GetTag( GetPartyMemberByIndex( i ) ) == "Handmaiden" )
      return TRUE;
   i++;
   }
   return FALSE;
}
I don't know how the game creates waves of opponents, but a way you can do it is to attach a spawning script to the OnDeath field of the enemy that you want to respawn. Every time the character is killed, you spawn a new one. Of course, you'll need some event to kick in to prevent this from going on forever. What do you have in mind for the stopping event?

- Star Admiral
Star Admiral is offline   you may: quote & reply,
Old 06-17-2009, 02:57 AM   #3
stoffe
Mostly dormant
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,834
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by TriggerGod View Post
A
1) How would I go about making a party member the leader, and setting it back to having your PC as the leader at a later time? (Like the bar fight on Nar Shaddaa between Atton and the Twin Suns, and Mira going through the Jekk Jekk Tar)
Use (for example) SetPartyLeader(NPC_ATTON) to change leader and then SetPartyLeader(NPC_PLAYER) to change back to the main character. Keep in mind that the main will disappear from the party in the meanwhile, and that any puppets (like Bao-Dur's remote) will vanish from the character being set as party leader while they're leader.

Quote:
Originally Posted by TriggerGod View Post
2) Would it be possible to check which party members are in your party as you enter a new area? To be more specific, how would I check if Brianna was in your party as you entered the tomb on Korriban?
Code:
if (IsNPCPartyMember(NPC_HANDMAIDEN])) {
    // Do stuff...
}
...in the OnAreaEnter event script for that area.

Quote:
Originally Posted by TriggerGod View Post
3) How would I set up a wave of enemies, similar to the waves upon waves of Dark Jedi on the Star Forge?
You can either use an Encounter trigger for that, or have a heartbeat script running on some object that checks for existing spawned enemies and then spawn more to make sure the desired amount are active. Encounters would require less/no scripting, though aren't as flexible depending on how you want it to work.


mt
stoffe is offline   you may: quote & reply,
Old 06-27-2009, 05:01 PM   #4
TriggerGod
Senior Member
 
TriggerGod's Avatar
 
Join Date: Mar 2008
Location: hiding
Posts: 2,415
Helpful! 
OK, thanks for the help so far. I have some more scripting woes.

I've edited appearance.2da, so that an unused line (The Darth Traya (Atris) line) can use my skins. I've hex edited the model, I've compiled and put into my override, and now I'm working on a script to change Atris into the new appearance when the script is ran. I got the script to change appearance from teekay's post on useful scripting functions, and I edited it to my use. But, for some reason, when I do this script:
Code:
// 850
// ChangeObjectAppearance
// oObjectToChange = Object to change appearance of
// nAppearance = appearance to change to (from appearance.2da)
void ChangeObjectAppearance( object p_atris, 491 );
the compilation aborts, with the error saying
Code:
syntax error at "integer constant"
I also tried making the 491 into the name of the row, like so:

Code:
// 850
// ChangeObjectAppearance
// oObjectToChange = Object to change appearance of
// nAppearance = appearance to change to (from appearance.2da)
void ChangeObjectAppearance( object p_atris, Unique_Darth_Atris );
This time, there is a syntax error at Unique_Darth_Atris.

Am I doing something wrong with this script?
TriggerGod 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 > Scripting 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 11:50 PM.

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