lfnetwork.com mark read register faq members calendar
View Poll Results: Would you download a mod that adds weapons in the escape pod?
Yes 2 33.33%
No 2 33.33%
Maybe if they weren't useless ones 4 66.67%
Multiple Choice Poll. Voters: 6. You may not vote on this poll


Thread: Conditional Script for a Script?
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-20-2009, 11:44 PM   #1
Mandalore_The_Great
Rookie
 
Mandalore_The_Great's Avatar
 
Join Date: Nov 2008
Location: Cali, Puerto Rico's homeland
Posts: 228
Current Game: My 360 Games
Conditional Script for a Script?

I've made a little mod that edits the .dlg for the escape pod on the Spire(end_pod, I think). I've made it so when a certain dialog branch is gone into, you get a few items.I need a conditional script but don't know how to write it, seeing as I've never needed one


I'm back!!! Mua ha ha ha ha... ha
I might be releasing some new mods for K1, so check Filefront for some of my mods, acrazyone1(or acrazy1one, can't remember)

"Mandalorians don't make threats. We make promises." --SithRevan Tribute Armor--
Mandalore_The_Great is offline   you may: quote & reply,
Old 01-21-2009, 12:06 AM   #2
HK-42
HK47+Marvin=
 
HK-42's Avatar
 
Join Date: Jun 2006
Location: The Unknown Regions
Posts: 2,040
Current Game: AssassinsCreed,kotor
Hot Topic Starter 
Quote:
Originally Posted by Mandalore_The_Great View Post
I've made a little mod that edits the .dlg for the escape pod on the Spire(end_pod, I think). I've made it so when a certain dialog branch is gone into, you get a few items.I need a conditional script but don't know how to write it, seeing as I've never needed one
Ive done a similar mod. Instead editing Carths dialog.

HK-42 is offline   you may: quote & reply,
Old 01-21-2009, 12:23 AM   #3
Mandalore_The_Great
Rookie
 
Mandalore_The_Great's Avatar
 
Join Date: Nov 2008
Location: Cali, Puerto Rico's homeland
Posts: 228
Current Game: My 360 Games
Do you know how to write this type of script?


I'm back!!! Mua ha ha ha ha... ha
I might be releasing some new mods for K1, so check Filefront for some of my mods, acrazyone1(or acrazy1one, can't remember)

"Mandalorians don't make threats. We make promises." --SithRevan Tribute Armor--
Mandalore_The_Great is offline   you may: quote & reply,
Old 01-21-2009, 02:18 AM   #4
Stream
Damn...
 
Stream's Avatar
 
Join Date: Nov 2007
Location: On your hard drive.
Posts: 469
Current Game: Fable 3
Helpful! LFN Staff Member 
What kind of conditional script do you need?

Stream is offline   you may: quote & reply,
Old 01-21-2009, 08:50 PM   #5
Mandalore_The_Great
Rookie
 
Mandalore_The_Great's Avatar
 
Join Date: Nov 2008
Location: Cali, Puerto Rico's homeland
Posts: 228
Current Game: My 360 Games
Just a dialogue conditional. I have an extra dlg option and after I use it I don't want it used again.


I'm back!!! Mua ha ha ha ha... ha
I might be releasing some new mods for K1, so check Filefront for some of my mods, acrazyone1(or acrazy1one, can't remember)

"Mandalorians don't make threats. We make promises." --SithRevan Tribute Armor--
Mandalore_The_Great is offline   you may: quote & reply,
Old 01-21-2009, 09:10 PM   #6
HK-42
HK47+Marvin=
 
HK-42's Avatar
 
Join Date: Jun 2006
Location: The Unknown Regions
Posts: 2,040
Current Game: AssassinsCreed,kotor
Hot Topic Starter 
Why would you need conditionals for a dialog option? Especially if it's the escape pod dialog. Just have the branch appear after you say you want to go to Taris. Then move the warp script(should be on the final node in the dialog) To after the items. Don't give a option to return to the endar spire so they can't reselect the item node.

If you still need a dialog script I can't help you there. That isn't one of the ones I have.

HK-42 is offline   you may: quote & reply,
Old 01-21-2009, 09:16 PM   #7
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! 
I see two ways of doing this. There's probably more, though. One, you can set a global variable after giving the items. Two, if you plan on giving the player a specific item not found elsewhere on the Endar Spire, you can check for the presence of that item within the player's inventory.

For the first method, you'll need to edit the globalcat.2da file. Add a new Boolean variable at the end of the file. The conditional would look something like this, where xxx is the name of whatever you named your new variable.

Code:
int StartingConditional() {
   if( GetGlobalBoolean( "xxx" ) == TRUE )
      return FALSE;
   return TRUE;
}
You'll also need to add the following line to the script that gives the player items.

Code:
SetGlobalBoolean( "xxx", TRUE );
For the second method, you'll need to make sure that of the items you give the player, there must be at least one that is not normally found on the Endar Spire, or else there might be a chance that the conditional would not work properly. This time, xxx refers to the item's tag.

Code:
int StartingConditional() {
   object oItem = GetFirstItemInInventory( GetFirstPC() );
   while( GetIsObjectValid( oItem ) ) {
      if( GetTag( oItem ) == "xxx" )
         return FALSE;
      oItem = GetNextItemInInventory( GetFirstPC() );
   }
   return TRUE;
}
Hope this helps.

EDIT: The method that HK-42 proposed works well too. Saves the hassle of all the scripts. I'll leave my examples just in case you decide to use them.

- Star Admiral
Star Admiral is offline   you may: quote & reply,
Old 01-22-2009, 07:20 PM   #8
Mandalore_The_Great
Rookie
 
Mandalore_The_Great's Avatar
 
Join Date: Nov 2008
Location: Cali, Puerto Rico's homeland
Posts: 228
Current Game: My 360 Games
I just thought it would be a good idea to allow you to be able to look around after. *shrug*
thanks SA, I'll save those scripts just in case. Thanks everybody
Off topic, but does anyone know where the .tpc for the force power lightning is? I mean the one that covers the caster's hand when it comes out?


I'm back!!! Mua ha ha ha ha... ha
I might be releasing some new mods for K1, so check Filefront for some of my mods, acrazyone1(or acrazy1one, can't remember)

"Mandalorians don't make threats. We make promises." --SithRevan Tribute Armor--
Mandalore_The_Great is offline   you may: quote & reply,
Old 01-23-2009, 02:58 AM   #9
glovemaster
Now-a-days GroovyCarrot
 
Join Date: Jan 2007
Location: Liverpool, UK
Posts: 697
Current Game: No time for games, sadly
Helpful! 
"Fx_Lightning.tpc" in "swpc_tex_tpa.erf" looks to be the one you want.


If you're looking for any of the junk I did a few years ago; you can probably still find it all on filefront
glovemaster is offline   you may: quote & reply,
Old 01-24-2009, 10:09 PM   #10
Mandalore_The_Great
Rookie
 
Mandalore_The_Great's Avatar
 
Join Date: Nov 2008
Location: Cali, Puerto Rico's homeland
Posts: 228
Current Game: My 360 Games
I found that one but when a guy casts it the part that's around his hand is still blue....


I'm back!!! Mua ha ha ha ha... ha
I might be releasing some new mods for K1, so check Filefront for some of my mods, acrazyone1(or acrazy1one, can't remember)

"Mandalorians don't make threats. We make promises." --SithRevan Tribute Armor--
Mandalore_The_Great is offline   you may: quote & reply,
Old 01-25-2009, 06:06 AM   #11
glovemaster
Now-a-days GroovyCarrot
 
Join Date: Jan 2007
Location: Liverpool, UK
Posts: 697
Current Game: No time for games, sadly
Helpful! 
I think the texture for that is "fx_conjure", you might want to try editing that and seeing if that changes anything.


If you're looking for any of the junk I did a few years ago; you can probably still find it all on filefront
glovemaster 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 > Conditional Script for a Script?

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:56 PM.

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