PDA

View Full Version : Transition ModuleA --> ModuleB


Chaos0815
06-29-2007, 10:18 PM
Hi everyone,
whats the best practice for module transition ?

I just started getting interested in modding.
I have created 2 modules(which i can warp to using cheats).

My problems are:
a) how do i get a script linked to a trigger (for transition)
b) how does the script look like. (jump waypoint xyz)
c) Since the game doesnt appear to be using scripts for transition between modules, how does it work there. (ScriptonEnter is empty)

Thx for any help,
Chaos0815

SithRevan
06-29-2007, 11:20 PM
Well first off is this new module you made a new planet or an addon to a pre-existing planet in the game?

If it is an addon to a pre-existing planet in the game I would recommend linking the transition to that new module to a door using the .git file properties.

Now if it is a new planet module... that is a little bit trickier because I will assume that you want to be able to go to the new planet module using the Ebon Hawk as the primary means of travel. That will mean number one you will have to edit the galaxymap's GUI file so you can tell the Ebon Hawk that you want to go to the planet via that function. You can find out how to do that here (http://www.lucasforums.com/showthread.php?t=169825). After doing that you will have to make trigger in the Ebon Hawk (via the .git file again) to be able to transition into the starting module of that area, which you will then have to tell the trigger to start a new module once you step over it using a code similar to this...


void main() {
if (GetIsPC(GetEnteringObject())) {
StartNewModule("Your_module's_name");
}
}

Then you must compile it, remembering to replace Your_module's_name with the name of your 1st new module and also making sure to put the name that you named the script into the "ScriptOnEnter" event in the trigger's script section.

Anyway though I wish you the best of luck to which ever option you take.;)

Chaos0815
06-30-2007, 07:59 AM
Thx for the reply,
i got one more question so. I am using the method with the git file.
It works so far as i get transported to the second module via a trigger.

//NO MORE PROBLEMS. JUST MESSED UP COORDINATES. I will leave the code for others :-)

The problem now is:
- arriving at a specific location.(currently i appear to reach the default starting position)

I tried setting up a waypoint and linked the trigger to it using the tags name.
Since i dont know how to use a waypoint file .utw i took one out of another module.

Any quick guesses ?

My current relevant Data of the git files (I ommited coordinates etc.)
Data:
Module MAL_CORE:
Trigger:
TemplateResRef Value =newtransition001
Tag=TO_MAL_ACC
TransitionDestin Value StringRef="101177"
LinkedToModule Value="MAL_ACC
LinkedTo Value=FROM_MAL_CORE

Module MAL_ACC:
Waypoint:
LinkedToValue=""
TemplateResRef Value="sw_waypoint002"
Tag Value="FROM_MAL_CORE"
LocalizedName Value StringRef="101179"
HasMapNote Value="0"
MapNote Value StringRef="-1"
MapNoteEnabled" Type="0" Value="1"