ga_move_exit
I understand what this script should do, but the conventions escape me. Why am I entering a number for an exit? Where would I even get this? I would think it should be the tag of a door to walk to.
Also, if I want the character to reappear in their house once they leave, what would that entail? Does the dissapear action despawn them or just destroy them?
I know these are not new scripts but new to me as I try to increase the ambience and polish of my future works.
Explanation for move_exit
Débuté par
Eguintir Eligard
, mai 26 2013 07:41
#1
Posté 26 mai 2013 - 07:41
#2
Posté 26 mai 2013 - 08:31
string GetExitWaypoint(int nExitNumber, string sWaypoint)
{
string sWPTag;
// No other parameters on the exit are set
if ( nExitNumber == 0 && sWaypoint == "")
{
sWPTag = "nwc_exit";
}
// An exit number is set
else if ( sWaypoint == "")
{
sWPTag = "nwc_exit" + IntToString(nExitNumber);
}
// An exit string is set
else
{
sWPTag = "nwc_" + sWaypoint;
}
return (sWPTag);
}
That's from the ga_move_exit script. Looks like it assumes that you have waypoints named "nwc_1" or "nwc_waypointname" or some such nonsense, likely having to do with conventiones that Obsidian used back in 2006 writing the game. If you name a waypoint "nwc_1" as its tag, yiou set the number to "1" and the npc will exit that way.
As for the despawn, I think you may need to recreate them in their house...since the text for ForceExit under ginc_misc states:
// Force creature w/ Tag sCreatureTag to move to exit WP and destroy self or despawn if roster member
void ForceExit(string sCreatureTag, string sWPTag, int bRun=FALSE)
{
string sWPTag;
// No other parameters on the exit are set
if ( nExitNumber == 0 && sWaypoint == "")
{
sWPTag = "nwc_exit";
}
// An exit number is set
else if ( sWaypoint == "")
{
sWPTag = "nwc_exit" + IntToString(nExitNumber);
}
// An exit string is set
else
{
sWPTag = "nwc_" + sWaypoint;
}
return (sWPTag);
}
That's from the ga_move_exit script. Looks like it assumes that you have waypoints named "nwc_1" or "nwc_waypointname" or some such nonsense, likely having to do with conventiones that Obsidian used back in 2006 writing the game. If you name a waypoint "nwc_1" as its tag, yiou set the number to "1" and the npc will exit that way.
As for the despawn, I think you may need to recreate them in their house...since the text for ForceExit under ginc_misc states:
// Force creature w/ Tag sCreatureTag to move to exit WP and destroy self or despawn if roster member
void ForceExit(string sCreatureTag, string sWPTag, int bRun=FALSE)
#3
Posté 26 mai 2013 - 08:31
You would get the number from the waypoint. It assumes you've littered your area with waypoints named nwc_exit1, nwc_exit2, nwc_exit3, etc. I don't know why it was written or what it was used for.
ga_force_exit does what you want.
ForceExit despawns roster members and destroys anything else.
ga_force_exit does what you want.
ForceExit despawns roster members and destroys anything else.
#4
Posté 26 mai 2013 - 11:28
Ouch. Destroys? I think Im better off with a move_to and a delayed jump to his house waypoint.
Thank you sires.
Thank you sires.
#5
Posté 27 mai 2013 - 02:09
If it's an NPC we're talking about and you need to use them "outside" of their normal environment, what I have done is used a copy of the NPC with a different tag name. Then when the conversation/cut scene is over, I use force exit to move them away and destroy them. The original is still in their "home" and never moves.
In this way, the original NPC and the copy can have different conversations, etc. It makes it useful if you want to move an NPC around town a bit and use them in different scenarios.
In this way, the original NPC and the copy can have different conversations, etc. It makes it useful if you want to move an NPC around town a bit and use them in different scenarios.
#6
Posté 27 mai 2013 - 12:28
ya thats an option until you get into issues with having multiple creatures with one tag. I also like the organic ( or should I say, true to life feel) of having the actual character do everything. And either way I gotta get him to join a chat in another building, then walk out, he might as well retain his body.
Its actually been quite easy, ga_move and ga_jump with an ample delay
Its actually been quite easy, ga_move and ga_jump with an ample delay
#7
Posté 28 mai 2013 - 04:25
Eguintir Eligard wrote...
I also like the organic ( or should I say, true to life feel) of having the actual character do everything.
That was how I felt initially. But as I worked on it I grew to fear something: in the process of having my one-true-NPC walking around between areas, I began to fear losing them, have them get stuck, or having them glitch in some way. And as I read more about other people doing this, that seemed to be the most common issue. So then you're stuck with a potentially crucial NPC unable to get back to its home area and potentially bugging your plot.
Using copies outside of the NPC's "home" area ensures I never have to worry about the one-true NPC getting lost/stuck/broken. And when it's a quest NPC... that's kind of important to me.
Either method has its potential pitfalls, clearly. Like many things in the toolset, it's a matter of personal preference. There's more than one way to skin a cat...
#8
Posté 29 mai 2013 - 04:36
he may get stuck with a walk but thats only going to prevent him from going to the door, and preserving the realism factor. He can't get stuck with the ga_jump because it will warp him to the waypoint... regardless of whether there is a line or not. He will just disappear from where he's standing.
I do use clones from time to time, such as when I want an elaborate costume change for party rest chat or so on.
I do use clones from time to time, such as when I want an elaborate costume change for party rest chat or so on.
#9
Posté 01 juin 2013 - 02:47
So is what you are doing just a combination of ga_move and when they reach the waypoint you're doing a ga_jump? I imagine it looks exactly like force_exit then, no?
#10
Posté 03 juin 2013 - 04:12
Ya if no one gets in the way. I used both on the same node, with just a delay (which is an option for both scripts). As much as I know about my own scripting, I find when using theirs, the conversation versions seem easier and more reliable than the direct versions.





Retour en haut






