PDA

View Full Version : Hey I need some help


Snufulupugus
09-14-2009, 05:00 PM
Alright. So I'm trying to set an npc (rakata to be precise) in the eastern dune sea of tatooine (tat_m18ac) with the idea that when I'm done talking to him, I will warp me to another module. I already have the dialogue and script for the conversation and warp, I've tested them, they work. But no matter what I try I can't get the npc to show up in the tat_m18ac module with out ruining the rest of the module and screwing up the game. I'm relatively new to this, so any help anyone could offer would be great.

Thanks! -Snufulupugus

Rtas Vadum
09-14-2009, 05:32 PM
I'm not exactly all that knowledgeable on scripting and such, but I know you have to have some existing action(entering a module, etc), that will spawn the NPC when it occurs. So you would need to add a spawn script to something within the module, be it the OnEnter script or something else.

Snufulupugus
09-14-2009, 05:58 PM
Well I tried working with an onEnter script for an hour or so and nothing I tried with it worked. I also tried taking all the m18ac.rim and m18ac_s.rim files and adding the npc into the .git, and compiling them all into one .mod file, but that didn't work either. So I don't know what I'm doing wrong on either way.

Mono_Giganto
09-14-2009, 06:01 PM
For reference, is the Eastern Dune Sea the section with the giant sandcrawler, or the section with the krayt dragon cave?

Snufulupugus
09-14-2009, 06:31 PM
Krayt Dragon cave

Mono_Giganto
09-14-2009, 06:36 PM
Alright, not quite what I was hoping for, but it still works.

If you're having trouble getting your NPC to spawn via the OnEnter script, you can try piggybacking your script onto an existing dialog within the module. Preferably an unavoidable dialog that gets triggered soon after your arrival, which was why I was hoping it'd be the other module. In this case, you could attach the script to Komad Fortuna's dialog, if you're willing to accept that he would then only spawn after you speak with Komad.

Otherwise I'd keep working on that OnEnter script. If you post what you have here, someone may be able to assist you in making corrections to your code.

Snufulupugus
09-14-2009, 07:08 PM
Here is the OnEnter script:
void main() {

ExecuteScript("k_mysterious alien_spawn", OBJECT_SELF);
ExecuteScript("old_k_ptat18aa_enter", OBJECT_SELF);

}





Here is the spawn script:
void main() {

object oEntering = GetEnteringObject();
object oCreature = GetObjectByTag("tat_rak");
if
if (GetIsObjectValid(oCreature) == FALSE)
CreateObject (OBJECT_TYPE_CREATURE, "tat_rak", Location(Vector (36.47, 456.30.y, 37.33), 270.0));
57
}



I would be perfectly ok if he spawned after talking to komad. But how would I piggyback that script onto komad's dialogue?

Mono_Giganto
09-14-2009, 07:25 PM
Well, assuming that your script executes properly, you can just attach it to a line of his dialog. Find Komad's dialog file within the module's folder in KotOR Tool, extract it, and open that file in TK102's dialog editor (A link can be found in Holowan, or at SWK by clicking the banner above).

Then, it's just a matter of finding a line within his dialog that must be spoken (you don't want to pick a line that can be avoided or the script won't fire!), and typing the name of your compiled script into the appropriate box.

I'm sorry I can't be more specific than this; I currently don't have access to either game. Hopefully someone more experienced with scripting will come along and may be able to point out an error in your script process, if there is one.

Snufulupugus
09-14-2009, 07:29 PM
Alright I'll give the piggy back a try. Thanks for the help. I'll let you know if it works or not.

Snufulupugus
09-14-2009, 10:06 PM
Alright well that didn't work. No clue what I'm doing wrong but NOTHING works. I moved on to a different mod where I needed to use a computer panel dialogue to warp to another module. I got the computer to show up (unlike the npc on tatooine) I wrote the dialogue and the warp code. The warp code is in the dialogue and the dialogue is in the computer, but when I try to select the computer panel and click, it doesn't bring up anything. Nothing happens. I reall wish I knew what I was doing wrong with all of these things.

Canderis
09-14-2009, 10:19 PM
In the UTI file for it did you check usable? And for Curse of the Sith I used a script to start the conversation. Its the only way I found to get the dialog to run.

Snufulupugus
09-15-2009, 01:54 AM
Yea I made sure to check usable. It lets me target it, but when I click to use - nothing. What do you mean you used a script to start the conversation? How does that work. (like I said, relatively new to this.)

Canderis
09-15-2009, 08:30 AM
void main() {
ActionStartConversation(GetFirstPC(),"dlg_filenamehere");
}
In the UTI file on the "onuse" or onclick" slot (can't remember exactly what its called. You put this script.

Snufulupugus
09-15-2009, 06:23 PM
Awesome thanks, I'll give this a try.