Aller au contenu

Photo

Transition Triggers Between Modules in a Campaign


  • Veuillez vous connecter pour répondre
13 réponses à ce sujet

#1
MokahTGS

MokahTGS
  • Members
  • 946 messages
Can someone show me how to make this work?  All of my transitions seem to be broken now that I've taken my one module and broken it up into multiple modules under one campaign.

What exactly do I need to do to make transitions work across modules?

#2
Hilltop2012

Hilltop2012
  • Members
  • 66 messages
Ive been using this and it seems to be working so far. I put this script on an action node of a conversation.



void main()

{



string sModuleName = "module name goes here";



LoadNewModule(sModuleName);



}

Here is the syntax from the toolset.



// Shut down the currently loaded module and start a new one (moving all

// currently-connected players to the starting point. This one saves out the

// old module's state.

void LoadNewModule(string sModuleName, string sWaypoint = "");



Hope this helps :)

#3
MokahTGS

MokahTGS
  • Members
  • 946 messages
Ok, I hate this forum...I miss the old script blocks.

Is that the whole script?  Also I'm transitioning to an overland map so the waypoint name in the new module is important.

#4
Hilltop2012

Hilltop2012
  • Members
  • 66 messages
Yes, I miss the old blocks as well, hehe. Yes, thats the whole script, but since your using an overland map you will have to specify the waypoint. Otherwise it will use the default area starting point. So add:



string sModuleName = "module name goes here";

string sWaypoint = "waypoint tag goes here";



LoadNewModule(sModuleName, sWaypoint);

#5
MokahTGS

MokahTGS
  • Members
  • 946 messages
Thank you, I'll try that!

#6
MokahTGS

MokahTGS
  • Members
  • 946 messages
Hey, so crazy thought, but how would you write the script to read two variables off a trigger?



ModuleName="module name goes here"

WPName="Waypoint Name Goes Here"

#7
Hilltop2012

Hilltop2012
  • Members
  • 66 messages
string ModuleName = GetLocalString(OBJECT_SELF, "variable name");

string WPName = GetLocalString(OBJECT_SELF, "variable name");

#8
Shaughn78

Shaughn78
  • Members
  • 637 messages
I use the following function to switch between modules.


#include "ginc_companion"
void main()
{
SaveRosterLoadModule(string module name, string start waypoint);
}

#9
Hilltop2012

Hilltop2012
  • Members
  • 66 messages
 // Despawn non-party roster members and save module state before transitioning to a new module// - sModuleName: Name of module to load// - sWaypoint: Optional starting point for partyvoid SaveRosterLoadModule( string sModuleName, string sWaypoint="" );

That does look like a better way. Now I have to go change my stuff around. :happy:

Thanks Shaugn78!

#10
MokahTGS

MokahTGS
  • Members
  • 946 messages
Can someone tell me why this isn't working:

//    ka_olmap_visit_wp
/*    Jumps the party to the waypoint whose tag is the same as the
    placeable's sTravelDest variable. Alternately, if you specify a tag of the Module or Waypoint, it'll work with that, too.
*/    `
//    Nchap
//    JSH-OEI 5/29/08 - Added autosave.

#include "ginc_debug"
#include "ginc_overland"
#include "ginc_companion"

void main(string sDestWPTag, string sDestModuleTag)
{
    if(sDestWPTag == "")
        sDestWPTag = GetDestWPTag();
   
    if(sDestModuleTag == "")
        sDestModuleTag = GetLocalString(OBJECT_SELF, "sDestModule");
   
    object oPC = GetLastUsedBy();
    object oWP = GetWaypointByTag(sDestWPTag);
   
    if( GetModuleName() == sDestModuleTag || sDestModuleTag == "")
    {
        PrettyDebug("Jumping " + GetName(oPC) + " to " + GetTag(oWP));
        oPC = GetFirstPC();
        ExitOverlandMap(oPC);        //This is a sanity check to verify that we don't hit any bugs dealing with saving.
        DoSinglePlayerAutoSave(); // Autosave
        JumpPartyToArea( oPC, oWP );
    }
   
    else
    {
        ExitOverlandMap(oPC);
        SaveRosterLoadModule(sDestModuleTag, sDestWPTag);
    }
}


I have the module tag and the waypoint tag correct.  All I get is a fade to black and then I'm right back to the OM.  :unsure:

#11
Shallina

Shallina
  • Members
  • 1 011 messages
you need to assigne the value of sDestWPTag and sDestModuleTag when you call that script.



If you call the script in an event field of an object, you must declare those Variable and their value in the variable field at the bottom of the script panel of your object.

#12
MokahTGS

MokahTGS
  • Members
  • 946 messages
To clarify, this script is called off a conversation node and the varibles are defined in the action tab of that node.

Both tags are set correctly in the dialog and it still dos not work.  It did work, and now it doesn't.

:crying:

Modifié par MokahTGS, 20 juillet 2010 - 07:52 .


#13
WyrinDnjargo

WyrinDnjargo
  • Members
  • 136 messages
use GetPCSpeaker rather than GetLastUsedBy from dialogue?



I don't have toolset here, but if you download my WPM stuff, you'll see all the OM scripts for module transitions I use there.

#14
Alupinu

Alupinu
  • Members
  • 528 messages
Have you looked at “Sunjammers World Map Guide”?



http://nwvault.ign.c...ls.Detail&id=54