Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Spawning Question

Page: 1 of 1
 Dak Drexl
05-05-2011, 9:10 PM
#1
So I know how to spawn characters around a module via scripting, but I have a different kind of question. What if I want to spawn something in a different module? Is this possible?

For example I am *anywhere*, lets say Tatooine. When a certain dlg is triggered I want someone to spawn on Manaan. Is this possible?

I want to make this similar to the sidequests of the party members is k1, where no matter where you are someone runs up to your ship and says hello. I know that and what I said above are sort of different, but if anyone can answer any of these questions it would be really helpful :)
 harIII
05-05-2011, 9:20 PM
#2
You need to have a boolean (true or false statement, by default is false) turn true when you need the character to spawn. Then the next time you enter the module (I think you want Manaan) you make an on spawn script (you may need to add to an already existing on spawn script) the syntax so that your character is spawned and then the boolean is turned to false (so that it won't happen every time you enter the module).
 Fallen Guardian
05-05-2011, 10:07 PM
#3
You could use on enter scripts, which are explained here (http://www.lucasforums.com/showthread.php?t=206216), and have that the character spawn on condition of a global boolean, like har said.
 Fastmaniac
05-06-2011, 10:44 AM
#4
The thing that I did with the mod I'm working on is to attach the spawn script to a dialogue that is triggered in that module for sure. For example, the first module you visit on Manaan (can't recall the exact name now), there is the selkath who is collecting money for arriving with the ship. If you include the script in there it has to be triggered when the PC visits Manaan. This method is as simple as it could be... Hope that helps...

Fastmaniac
 harIII
05-06-2011, 10:48 AM
#5
Easy method granted and would be quit practical but what should happen if the PC already visited Manaan? I find the best method for such an operation is to use the global booleans. They are very easy to learn. The module creation tutorial I made goes into the use of numbers and booleans. Making the videos was my first experience with numbers but they are incredibly easy to learn.
 Viado Onasi
05-06-2011, 11:58 AM
#6
Like with the genohardan. You get the datapad after completing tat. You go to Manaan and you can talk to a sepical one guy, or if you talk to him when you find out about you identity; you cango to tat and fight him so it would spawn the group there, something like that? It has both scripts and the stuff har talks about.
 harIII
05-06-2011, 12:19 PM
#7
Yeah you can do it that way too. You just need to the change the conditional statement in the onEnter or onSpawn field script to read if the pc has this item then spawn that character.
 Fastmaniac
05-07-2011, 1:18 PM
#8
Easy method granted and would be quit practical but what should happen if the PC already visited Manaan?

Well, I can remember that you have to pay 100 Credits EACH TIME you visit Manaan so the dialogue is triggered everytime you land there... Global Booleans is safer of course. But I think it's more difficult to edit an OnEnter or OnSpawn script than to include it in a conversation.
 Fallen Guardian
05-07-2011, 1:29 PM
#9
Onenter scripts are actually very easy, all you have to do is write your script and then make it run the original OnEnter script.
 Fastmaniac
05-07-2011, 3:18 PM
#10
I didn't mean they were difficult to write. I just meant it's easier to include the script in a dialogue and to leave the more important files alone (I don't like messing with the game;)). I was just giving another option for Dak Drexl to try.
 Fallen Guardian
05-07-2011, 7:44 PM
#11
All right, I get your meaning.
Page: 1 of 1