|
|
 |
03-04-2012, 11:48 AM
|
#121
|
|
Rookie
Join Date: Dec 2011
Location: Death Star
Posts: 158
Current Game: The Search For Revan
|
To do this, you need to set a boolean which will return true when you've talked to the character. Then create a conditional script for the line of dialog you want available after you've talked.
This script will set the boolean,
Code:
void main () {
SetLocalBoolean(HAS_TALKED,0,TRUE);
}
This script will check to see if you've talked yet,
Code:
int StartingConditional() {
int nTalked = GetLocalBoolean(HAS_TALKED,0);
return nTalked;
}
In the dialog file, put the dialog node you want the character to say AFTER you've talked before at the top. Then, in the conditional field, put the name of the second script.
In the node of dialog you want the character to say the first time you talk, you need to put the first script in the script field. You can put it on any line of dialog but you need to decide where it would be best suited.
Depending on the situation, you can make this as complicated or simple as you want, with many different conditional scripts.
|
|
you may:
quote & reply,
|
03-04-2012, 12:04 PM
|
#122
|
|
Junior Member
Join Date: Nov 2011
Location: Under a Bed
Posts: 486
Current Game: Kotor 1
|
So let me get this straight. The boolean script goes with the node my pc can only say once and the first time they speak. IE. to spawn something
The conditional script goes with 2nd line so i cant spawn it again?
|
|
you may:
quote & reply,
|
03-04-2012, 12:09 PM
|
#123
|
|
Rookie
Join Date: Dec 2011
Location: Death Star
Posts: 158
Current Game: The Search For Revan
|
What exactly are you trying to do?
|
|
you may:
quote & reply,
|
03-04-2012, 03:44 PM
|
#124
|
|
Junior Member
Join Date: Nov 2011
Location: Under a Bed
Posts: 486
Current Game: Kotor 1
|
Thought I'd add it dosn't compile. It sasis:
Undeclared Indentifier "HAS_TALKED:
And
Required Argument missing in call to "SetLocalBoolean"
Here is the script:
Code:
void main () {
SetLocalBoolean(HAS_TALKED,0,TRUE);
}
Same errors with the second script:
Code:
int StartingConditional() {
int nTalked = GetLocalBoolean(HAS_TALKED,0); return nTalked;
}
|
|
you may:
quote & reply,
|
03-04-2012, 04:13 PM
|
#125
|
|
Wandering the Galaxy...
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,148
Current Game: Fallout: New Vegas
|
If you want to have a check wether the person has been talked to just use in-game resources.
k_con_talkedto checks if you've talked to a person, and k_act_talktrue makes it so that the game recognizes that you've talked to the person, basically this:
Code:
void main () {
SetLocalBoolean(HAS_TALKED,0,TRUE);
}
Anyway, I use that a lot in KotOR 1, I don't know if it works in KotOR 2.
|
|
you may:
quote & reply,
|
03-05-2012, 02:37 AM
|
#126
|
|
Rookie
Join Date: Dec 2011
Location: Death Star
Posts: 158
Current Game: The Search For Revan
|
Oh ok then, try using that DJW, I don't play around with dialog and stuff too much so I'm not an expert
Thanks for the future reference Fallen 
|
|
you may:
quote & reply,
|
03-05-2012, 11:44 AM
|
#127
|
|
Junior Member
Join Date: Nov 2011
Location: Under a Bed
Posts: 486
Current Game: Kotor 1
|
Quote:
Originally Posted by Fallen Guardian
If you want to have a check wether the person has been talked to just use in-game resources.
k_con_talkedto checks if you've talked to a person, and k_act_talktrue makes it so that the game recognizes that you've talked to the person, basically this:
Code:
void main () {
SetLocalBoolean(HAS_TALKED,0,TRUE);
}
Anyway, I use that a lot in KotOR 1, I don't know if it works in KotOR 2.
|
Its for kotor 1 anyway, thanks guys 
if theres k_act_talktrue, is there k_act_talkfalse?
|
|
you may:
quote & reply,
|
03-05-2012, 12:44 PM
|
#128
|
|
Wandering the Galaxy...
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,148
Current Game: Fallout: New Vegas
|
I don't believe so. This is the source code for k_act_talktrue:
Code:
//:: k_act_talktrue
/*
Sets the NPC talk to state to
true.
*/
//:: Created By: Preston Watamaniuk
//:: Copyright (c) 2002 Bioware Corp.
#include "k_inc_debug"
#include "k_inc_utility"
void main()
{
UT_SetTalkedToBooleanFlag(OBJECT_SELF);
}
I wouldn't really know how to get this thing set to false again, but maybe a more experience scripter knows.
|
|
you may:
quote & reply,
|
03-05-2012, 03:44 PM
|
#129
|
|
Senior Member
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,563
|
That's not the source code. Well, it is. Well, it isn't. Anyway, here's the exact source code:
Code:
SetLocalBoolean(oTarget, SW_PLOT_HAS_TALKED_TO, nState)
Just set nState as FALSE and I believe that should do the trick.
|
|
you may:
quote & reply,
|
03-06-2012, 12:38 PM
|
#130
|
|
Junior Member
Join Date: Nov 2011
Location: Under a Bed
Posts: 486
Current Game: Kotor 1
|
Quote:
Originally Posted by Fallen Guardian
If you want to have a check wether the person has been talked to just use in-game resources.
k_con_talkedto checks if you've talked to a person, and k_act_talktrue makes it so that the game recognizes that you've talked to the person, basically this:
Code:
void main () {
SetLocalBoolean(HAS_TALKED,0,TRUE);
}
Anyway, I use that a lot in KotOR 1, I don't know if it works in KotOR 2.
|
Would this work.
First time the npc sais a node. Run k_act_talktrue.
Second Time, run k_con_talkedto, which will open a different node.
Is there something I'm missing?
Thanks
-DJW
-JC-
It sais syntax error at SetLocalBoolean
SetLocalBoolean(oTarget, SW_PLOT_HAS_TALKED_TO, FALSE)
It sais
Syntax error at GiveXPToCreature
GiveXPToCreature(GetFirstPC(),500);
What do I do?
Same old error, it sais syntax error on CreateItemOnObject
CreateItemOnObject("g_a_jediscout", oPC);
CreateItemOnObject("g_w_lghtsbr10", oPC);
Last edited by UltimateHK47; 03-06-2012 at 12:57 PM.
|
|
you may:
quote & reply,
|
03-06-2012, 04:03 PM
|
#131
|
|
Senior Member
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,563
|
Quote:
Originally Posted by DarthJango/Weasley
It sais syntax error at SetLocalBoolean
SetLocalBoolean(oTarget, SW_PLOT_HAS_TALKED_TO, FALSE)
|
Looks like you forgot a semicolon there. You can probably ignore the messages that come after this; the debugger gets confused sometimes.
|
|
you may:
quote & reply,
|
03-06-2012, 04:27 PM
|
#132
|
|
Mod Longer, Forum Less
Status: Moderator
Join Date: Jan 2008
Location: Ebon Hawk
Posts: 1,700
Current Game: Mechwarrior II: Mercenaries
|
Decided to sticky this since it has become such a popular resource. Keep up the good work guys! 
-SS
Last edited by Sithspecter; 03-06-2012 at 06:34 PM.
|
|
you may:
quote & reply,
|
03-06-2012, 04:30 PM
|
#133
|
|
Junior Member
Join Date: Nov 2011
Location: Under a Bed
Posts: 486
Current Game: Kotor 1
|
Quote:
Originally Posted by JCarter426
Looks like you forgot a semicolon there. You can probably ignore the messages that come after this; the debugger gets confused sometimes.
|
Won't let me compile with errors  i have no idea how to use the other script compiler)
|
|
you may:
quote & reply,
|
03-06-2012, 05:45 PM
|
#134
|
|
Senior Member
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,563
|
If you're still getting errors, I'll need to see the whole script. Syntax errors are usually typos, and the debugger isn't always accurate about their location.
|
|
you may:
quote & reply,
|
03-07-2012, 01:24 PM
|
#135
|
|
Junior Member
Join Date: Nov 2011
Location: Under a Bed
Posts: 486
Current Game: Kotor 1
|
xp.nss
GiveXPToCreature(GetFirstPC(),500);
createit.nss
CreateItemOnObject("g_a_jediscout", oPC);
CreateItemOnObject("g_w_lghtsbr10", oPC);
falseboolean.nss
SetLocalBoolean(oTarget, SW_PLOT_HAS_TALKED_TO, FALSE);
All the same sort of errors, the, CreateItemOnObject
Trying one of my ideas, (when it comes to scripting im a duck)
it compiled. This :
void main()
{
GiveXPToCreature(GetFirstPC(),500);
}
Why is this?
This sais undeclared identifyer at oPC
void main ()
{
CreateItemOnObject("g_a_jediscout", oPC);
CreateItemOnObject("g_w_lghtsbr10", oPC);
}
And the same for oTarget
Required argument missing in SetLocalBoolean
Undeclared identifier SW_PLOT_HAS_TALKED_TO
void main()
{
SetLocalBoolean(oTarget, SW_PLOT_HAS_TALKED_TO, FALSE);
}
What eelse do you need to know?
PS: How does the boolean script work. i want it to check if you havn't said something, and if you havn't get the option to the dialouge entry I want said only once. Will it do that?
Last edited by UltimateHK47; 03-07-2012 at 01:38 PM.
|
|
you may:
quote & reply,
|
03-07-2012, 02:43 PM
|
#136
|
|
Foxy Boxes!
Join Date: May 2007
Location: Tinternet
Posts: 3,304
Current Game: TOR.. Still want K3 though! :(
|
You haven't declared your variables.
For example, oPC on it's own doesn't mean anything. If you do this:
Code:
void main()
{
object oPC = GetFirstPC();
CreateItemOnObject("g_a_jediscout", oPC);
CreateItemOnObject("g_w_lghtsbr10", oPC);
}
It should work fine. Same with oTarget, you haven't said what oTarget is.
Looking for a reliable place to host your KotOR and TSL mods? Look no further than KotORFiles!
We have a great team, who will be sure to get your mod uploaded ASAP, after you submit. We also get 1000's of visitors every day, so your file is sure to get noticed!
You can watch my KotOR and TSL video's on YouTube!
|
|
you may:
quote & reply,
|
03-07-2012, 06:19 PM
|
#137
|
|
Senior Member
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,563
|
Quote:
Originally Posted by DarthJango/Weasley
PS: How does the boolean script work. i want it to check if you havn't said something, and if you havn't get the option to the dialouge entry I want said only once. Will it do that?
|
No, that would just set it so you haven't talked to the NPC, even when you have (at least, I think it should do that). If you want to check whether you have talked to an NPC yet, you need a conditional script... they work very differently. But fortunately you don't need to write your own, because the game already has one, k_con_talkedto in K1 and c_talkedto in K2. It will return true if you've never talked to the NPC before.
You need to put the script as a conditional script in the dialogue ("script that determines availability" or some such in K1, "Conditional #1" or "Conditional #2" in K2). If the script returns true, the node will be used. Make sure this node is the highest node in the dialogue file so that the game knows to check it first. I think there are more in depth tutorials here, too.
|
|
you may:
quote & reply,
|
03-07-2012, 07:25 PM
|
#138
|
|
Junior Member
Join Date: Jan 2010
Posts: 395
|
Why are we using scripts for this again?
Just using a_local_set and a_local_reset to decide which nodes are (in)available, and use c_local_set or c_local_notset to check for them.
A little harder for KOTOR1 since it only has one conditional field and 1 script field, but unless you want to do other stuff it's the easiest way to do it...
|
|
you may:
quote & reply,
|
03-07-2012, 09:54 PM
|
#139
|
|
Senior Member
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,563
|
Those are scripts too. And they don't exist in K1. And... it's the same thing anyway.
The talked to scripts check a local boolean that is specifically reserved for whether the NPC has been talked to yet. Although that does remind me, at some point in the initial conversation, you'll have to fire a script that sets the boolean. k_act_talktrue in K1 and a_talktrue in K2. Forgot to mention that before.
|
|
you may:
quote & reply,
|
03-08-2012, 05:05 AM
|
#140
|
|
Junior Member
Join Date: Jan 2010
Posts: 395
|
Except that you don't need to write new scripts, just add/remove and check locals in the dlg-editor.
Seeing how handy it is (and often used in TSL) it's not used in KOTOR1? Ouch.
KOTOR2 is definitely a lot more modder-friendly 0_0
|
|
you may:
quote & reply,
|
03-08-2012, 12:06 PM
|
#141
|
|
Junior Member
Join Date: Nov 2011
Location: Under a Bed
Posts: 486
Current Game: Kotor 1
|
Quote:
Originally Posted by Marius Fett
You haven't declared your variables.
For example, oPC on it's own doesn't mean anything. If you do this:
Code:
void main()
{
object oPC = GetFirstPC();
CreateItemOnObject("g_a_jediscout", oPC);
CreateItemOnObject("g_w_lghtsbr10", oPC);
}
It should work fine. Same with oTarget, you haven't said what oTarget is.
|
void main()
{
object oTarget = GetFirstNPC();
SetLocalBoolean(oTarget, SW_PLOT_HAS_TALKED_TO, FALSE);
}
This is me taking a stab at it
The erorrs are the same, but replacing oTarget with undeclared identifyer GetFirstNPC same undecalerd with SW_PLOT_HAS_TALKED_TO and the same error with SteLocalBoolean. The other script works fine thanks. 
|
|
you may:
quote & reply,
|
03-08-2012, 06:06 PM
|
#142
|
|
Senior Member
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,563
|
Quote:
Originally Posted by Hassat Hunter
Except that you don't need to write new scripts
|
And... I just said that.
Quote:
just add/remove and check locals in the dlg-editor.
Seeing how handy it is (and often used in TSL) it's not used in KOTOR1? Ouch.
|
No, it's not. There are no parameters in the dialogue files, so you would need a new script for everything.
Quote:
|
KOTOR2 is definitely a lot more modder-friendly 0_0
|
Yes, yes it is.
Quote:
Originally Posted by DarthJango/Weasley
void main()
{
object oTarget = GetFirstNPC();
SetLocalBoolean(oTarget, SW_PLOT_HAS_TALKED_TO, FALSE);
}
This is me taking a stab at it
The erorrs are the same, but replacing oTarget with undeclared identifyer GetFirstNPC same undecalerd with SW_PLOT_HAS_TALKED_TO and the same error with SteLocalBoolean. The other script works fine thanks. 
|
It's GetFirstPC, not GetFirstNPC.
SW_PLOT_HAS_TALKED_TO might be defined in the file I was reading... I thought it was defined in NWScript. I'll have to check that. In any case, you don't need that; just follow my above instructions.
Last edited by JCarter426; 03-08-2012 at 06:11 PM.
|
|
you may:
quote & reply,
|
03-08-2012, 07:37 PM
|
#143
|
|
Junior Member
Join Date: Jan 2010
Posts: 395
|
Dang.
So, this would work though, right? (KOTOR1 still has locals, multiple of them, right? Which could be used to check?)
Code:
void main()
{
object oTarget = GetObjectByTag( "NPC_Talking" );
SetLocalBoolean(oTarget, 51, TRUE);
}
Code:
void main() {
object oTarget = GetObjectByTag( "NPC_Talking" );
If GettLocalBoolean(oTarget, 51, TRUE) {
return 1;
}
Else {
return 0;
}
}
|
|
you may:
quote & reply,
|
03-08-2012, 08:02 PM
|
#144
|
|
Senior Member
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,563
|
Yeah, but there's already a boolean reserved for that, and there's already a script that checks and sets it.
|
|
you may:
quote & reply,
|
03-08-2012, 08:14 PM
|
#145
|
|
Junior Member
Join Date: Jan 2010
Posts: 395
|
Although of course you could replace "51" by "52" or "53" or "54", and have more checks than 1 mere boolean can give you...
Which is the very nice thing about locals in KOTOR2
|
|
you may:
quote & reply,
|
03-11-2012, 03:08 PM
|
#146
|
|
Modder
Join Date: Jan 2007
Location: Tatooine
Posts: 1,575
Current Game: KotOR: EotF
|
Well, while modding in TSL, I found a minor flaw in the following script I made: the party selection screen doesn't show up regardless of how I've changed that part of the script. Any help would be appreciated.
Code:
// recruit.nss
// Created by Ferc Kast
void RecruitA(int iNPC, string sResRef, string sExit, int iForce)
{
int iNPC;
string sResRef;
string sExit;
int iForce;
RemoveAvailableNPC(iNPC);
AddAvailableNPCByTemplate(iNPC, sResRef);
if ( iForce == TRUE )
{
DelayCommand(1.5,ShowPartySelectionGUI(sExit, iNPC));
}
else if ( iForce == FALSE )
{
DelayCommand(1.5,ShowPartySelectionGUI(sExit));
}
}
void RecruitB(string sTag)
{
string sTag;
object oNPC = GetObjectByTag(sTag);
ActionPauseConversation();
SetGlobalFadeOut(1.0, 0.5);
DelayCommand(1.0, DestroyObject(oNPC));
DelayCommand(1.0,SetGlobalFadeIn(0.7,0.0));
ActionResumeConversation();
}
|
|
you may:
quote & reply,
|
03-11-2012, 08:53 PM
|
#147
|
|
Senior Member
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,563
|
I don't see iForce ever being defined as true or false, and you told it only to fire if iForce is true or false, which I find unnecessary, but that means this looks to be only a partial fragment; I'd need to see the rest to make sure any attempt at a fix wouldn't mess with the rest of it. But for now, I can give one bit of advice. First, get rid of your if trees, just replace it with the following:
Code:
DelayCommand(1.5, ShowPartySelectionGUI(sExit, iNPC1, iNPC2, FALSE);
And when you put in the NPC ID number in the DLG, just put in -1 for when you don't want to force anyone, or change your if trees to set them to -1 for anything other than the valid NPC ID numbers. The point of all this is if trees are finicky, particularly with this engine, so it's better to not have the whole execution of the script depend on one.
|
|
you may:
quote & reply,
|
03-11-2012, 09:20 PM
|
#148
|
|
Wandering the Galaxy...
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,148
Current Game: Fallout: New Vegas
|
Alright, in KotOR 1, I've been attempting to make an NPC walk over to the PC and once the NPC is about 5 meters or so from the PC he initiates a conversation with the PC. This is the script I've been using:
Code:
void main()
{
object oPC=GetFirstPC();
object oNPC=GetObjectByTag("dt_comm");
int nCurrentDistance;
int nEvent = GetUserDefinedEventNumber();
nCurrentDistance = GetDistanceBetween(oNPC, oPC);
if(
(nEvent == 1002) &&
(nCurrentDistance<6) &&
GetGlobalBoolean("DT_CHECK1") == FALSE) {
ActionDoCommand(SetCommandable(TRUE, oNPC));
AssignCommand (oNPC, ActionMoveToObject(oPC));
AssignCommand (oNPC, ActionStartConversation(GetFirstPC()));
}
}
I get an error trying to compile it saying that the equal sign between nCurrentDistance and GetDistanceBetween is incorrect. This is most likely due to the fact I tried to copy of a script that would make something occur once an NPC reached a certain HP level. What should I change, or redo entirely, to make this work?
EDIT 1: Alright, while digging through source scripts searching for functions in my other modding projects, I found something that should work:
Code:
#include "k_inc_debug"
void main()
{
object oPC=GetFirstPC();
object oNPC=GetObjectByTag("dt_comm");
int nEvent = GetUserDefinedEventNumber();
if(
(nEvent == 1002) &&
GetGlobalBoolean("DT_CHECK1") == FALSE) &&
GetDistanceBetween(GetPCSpeaker(), GetFirstPC()) <= 6.00)){
ActionDoCommand(SetCommandable(TRUE, oNPC));
int bRun=TRUE;
AssignCommand (oNPC, ActionMoveToObject(oPC, bRun, fRange=1.0f));
AssignCommand (oNPC, ActionStartConversation(GetFirstPC()));
}
}
I'll get back if it works or not.
EDIT 2: Alright, now I get a syntax error at the && after GetGlobalBoolean. How would I fix this?
Last edited by Fallen Guardian; 03-13-2012 at 09:58 PM.
Reason: Error
|
|
you may:
quote & reply,
|
03-14-2012, 07:41 AM
|
#149
|
|
Modder
Join Date: Jan 2007
Location: Tatooine
Posts: 1,575
Current Game: KotOR: EotF
|
Quote:
Originally Posted by JCarter426
I don't see iForce ever being defined as true or false, and you told it only to fire if iForce is true or false, which I find unnecessary, but that means this looks to be only a partial fragment; I'd need to see the rest to make sure any attempt at a fix wouldn't mess with the rest of it. But for now, I can give one bit of advice. First, get rid of your if trees, just replace it with the following:
Code:
DelayCommand(1.5, ShowPartySelectionGUI(sExit, iNPC1, iNPC2, FALSE);
And when you put in the NPC ID number in the DLG, just put in -1 for when you don't want to force anyone, or change your if trees to set them to -1 for anything other than the valid NPC ID numbers. The point of all this is if trees are finicky, particularly with this engine, so it's better to not have the whole execution of the script depend on one.
|
Somehow, the selection GUI still didn't show up, after changing those trees to the simply command. Though, when I checked afterwards, the party member is recruited & able to be chosen for the player's current party. 
|
|
you may:
quote & reply,
|
03-17-2012, 02:34 PM
|
#150
|
|
Wandering the Galaxy...
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,148
Current Game: Fallout: New Vegas
|
Alright, I've managed to get my above script to compile by making it like this:
Code:
void main()
{
object oPC=GetFirstPC();
object oNPC=GetObjectByTag("dt_comm");
int nEvent = GetUserDefinedEventNumber();
int bRun=TRUE;
if(
(nEvent == 1002) &&
GetGlobalBoolean("DT_CHECK1") == FALSE)
{
if(GetDistanceBetween(oNPC, oPC) <= 6.0){
ActionDoCommand(SetCommandable(TRUE, oNPC));
AssignCommand (oNPC, ActionMoveToObject(oPC, bRun));
AssignCommand (oNPC, ActionStartConversation(GetFirstPC()));
}
}
}
I'll edit this post to tell if it works in-game or not.
|
|
you may:
quote & reply,
|
03-20-2012, 08:19 PM
|
#151
|
|
Senior Member
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,563
|
Hmm. I've found ActionMoveToObject to be unreliable. ActionForceMoveToObject very rarely fails me, however. (Again, that's probably why it exists in the first place.)
Code:
// 383: Force the action subject to move to oMoveTo.
void ActionForceMoveToObject(object oMoveTo, int bRun=FALSE, float fRange=1.0f, float fTimeout=30.0f);
The variables are basically the same except there's a float at the end... I believe that's how long it will try before giving up.
Quote:
Originally Posted by Ferc Kast
Somehow, the selection GUI still didn't show up, after changing those trees to the simply command. Though, when I checked afterwards, the party member is recruited & able to be chosen for the player's current party. 
|
Yeah, as I said I'd need to see the whole thing to be sure. It sounds like some other part of the script is interfering with this particular function.
|
|
you may:
quote & reply,
|
03-20-2012, 08:38 PM
|
#152
|
|
Junior Member
Join Date: Jan 2010
Posts: 395
|
Force usually teleports though.
Tried to have people leave the Nar Shaddaa cantina through the door, it's impossible.
Regular move just gets them stuck, force move instantly teleported them (since no good path).
Then again might have been the map since trying to make a NPC run to the middle of the cantina gave big problems too...
|
|
you may:
quote & reply,
|
03-20-2012, 10:10 PM
|
#153
|
|
Wandering the Galaxy...
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,148
Current Game: Fallout: New Vegas
|
Hmm, well both ActionMoveToObject and ActionForceMoveToObject aren't working. In fact, it appears something's gotten really messed up. The character won't walk his waypoints and the perception event doesn't seem to be firing.
|
|
you may:
quote & reply,
|
03-22-2012, 10:07 PM
|
#154
|
|
Senior Member
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,563
|
Quote:
Originally Posted by Hassat Hunter
Force usually teleports though.
Tried to have people leave the Nar Shaddaa cantina through the door, it's impossible.
Regular move just gets them stuck, force move instantly teleported them (since no good path).
Then again might have been the map since trying to make a NPC run to the middle of the cantina gave big problems too...
|
I've never had anything like this happen.
Quote:
Originally Posted by Fallen Guardian
Hmm, well both ActionMoveToObject and ActionForceMoveToObject aren't working. In fact, it appears something's gotten really messed up. The character won't walk his waypoints and the perception event doesn't seem to be firing.
|
In that case, I'd say you probably made a typo at some point, and you should either start everything over from scratch or carefully check everything.
|
|
you may:
quote & reply,
|
04-03-2012, 02:50 PM
|
#155
|
|
Wandering the Galaxy...
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,148
Current Game: Fallout: New Vegas
|
Okay, so I've been attempting to get this:
Code:
void main()
{
object oPM1 = GetPartyMemberByIndex(1);
ApplyEffectToObject(1, EffectMovementSpeedDecrease(99, oPM1, 18));
}
To compile for a while now, but I keep on getting two errors. 1: Too many arguments specified for EffectMovementSpeedDecrease 2: Required argument missing in ApplyEffectToObject.
Could someone explain to me what I've done wrong?
|
|
you may:
quote & reply,
|
04-03-2012, 04:49 PM
|
#156
|
|
Senior Member
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,563
|
Looks like you ended the parenthesis in the wrong place.
Code:
void main()
{
object oPM1 = GetPartyMemberByIndex(1);
ApplyEffectToObject(1, EffectMovementSpeedDecrease(99), oPM1, 18.0);
}
That should do it. Well, maybe.
|
|
you may:
quote & reply,
|
04-03-2012, 05:06 PM
|
#157
|
|
Wandering the Galaxy...
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,148
Current Game: Fallout: New Vegas
|
Alright, it compiles. I'll check back and tell if it works in-game.
EDIT: It works, though a speed decrease of 99 is ridiculous, as they barely move at all. Making it EffectMovementSpeedDecrease(45) makes the usual waddle of the GetPartyMemberByIndexFunction Movement look normal.
Last edited by Fallen Guardian; 04-03-2012 at 05:23 PM.
|
|
you may:
quote & reply,
|
04-03-2012, 06:12 PM
|
#158
|
|
Senior Member
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,563
|
Nice! I've never actually tried that. Good to know it actually works, no more silly speed-walking.
|
|
you may:
quote & reply,
|
04-17-2012, 01:40 AM
|
#159
|
|
Wandering the Galaxy...
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,148
Current Game: Fallout: New Vegas
|
Module Warping
Alright, so I have come here to ask this:
If the PC were to have a conversation with a party member in which that party member were to share his/her past with the PC in flashback form (start a new module and have a fancy cutscene) would there be a way to check what module, and what coordinates in that module that the PC was at, before the flashback took place in order to warp the PC back to the right location after the flashback (cutscene) took place?
|
|
you may:
quote & reply,
|
04-17-2012, 08:48 PM
|
#160
|
|
Senior Member
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,563
|
There is - probably - but the question is how much effort you want to spend to do so. It can be done relatively easily in K2, by spawning a waypoint at the characters' positions and then moving them there when the module reloads... but I don't believe you can spawn waypoints in K1, at all. The only instance of something like this happening in K1 that I can remember is the Revan flashback; yes, the beginning is just a Bink video, but Revan taking his mask off is a proper cutscene module (side note: I believe they did this for people who disable Bink videos, so they would know what the hell was going on). But that scene starts as a cutscene, and so naturally the waypoints already exist. But I'm guessing you want something along the lines of Kreia's fall - so the conversation can happen anywhere, and placing waypoints ahead of time would be impossible.
But fear not! I have an alternative solution: invisible placeable. You should be able to spawn it in by normal means. I did something along these lines, though it didn't involve leaving the module - and of course I can't remember why I had to do it this way anymore.  I don't have access to my source scripts at the moment, but if memory serves, you need to do something like:
Code:
location L1 = Location(GetPosition(oNPC1), (GetFacing(oNPC1));
...and spawn the invisible object at that location, before you transit away. Then when you load the module again, just teleport the NPC to the placeable. Or for some reason if you have to spawn a new NPC, get the location of the placeable this time and spawning the NPC there.
Repeat as needed.
|
|
you may:
quote & reply,
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Forum Jump
|
|
|
|
|
|