Aller au contenu

Photo

Script Request: Is there a script to make my party walk together from point A to point B?


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

#1
ColorsFade

ColorsFade
  • Members
  • 1 271 messages
I couldn't find one by default. 

I am certain my next step is to write on myself, looping through the roster to figure out who is in the group and then making them walk... 

#2
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages
Hi,

Coding depends on whether this is going to be for SP or MP game ... and if the latter, if you are forcing all players to follow. Either way, you'll probably need to use the SetCommandable function to force the option to prevent the player from overriding the action.

Lance.

#3
Dann-J

Dann-J
  • Members
  • 3 161 messages
The ginc_group include file has some relevant functions. You just have to convert the PC's faction to a temporary group, then use the many group related functions available.

#4
andysks

andysks
  • Members
  • 1 652 messages
I might be talking nonsense now, but since there is a jump party to formation, shouldn't it be also a walk party to formation? I mean I know there isn't, but it should be possible.

#5
Dann-J

Dann-J
  • Members
  • 3 161 messages
The challenge would be keeping them in formation if their movement speeds are different (barbarian / monk feats, encumbered party members, haste or slow spells, etc). It'd be like trying to herd cats.

EDIT:

There is a GroupMoveToFormationLocation() function that moves the group so that it stands in formation around a particular location. The notes for the function say you should set the formation and noise beforehand. The party may well end up in formation, but there's no guarantee they won't descend into an unruly mob before getting there.

Modifié par DannJ, 29 octobre 2013 - 09:59 .


#6
ColorsFade

ColorsFade
  • Members
  • 1 271 messages
I am wondering... if I just move the PC, will the rest of the group auto-follow?

I think I'm going to give that a shot and see what happens. I don't need them to be in formation, but if they would auto-follow that would be great.

#7
kevL

kevL
  • Members
  • 4 070 messages
TonyK wrote up a function, HenchFollowMaster() in 'hench_i0_hensho' that you might want a peek at. Something to keep in mind, tho, is that some of those flags may/may not play around with the Behavior states reflected on character sheets etc.

the other option, like Lance suggests, is SetCommandable(FALSE) -- so no one gets interrupted -- then ActionForceFollowObject() on all faction.

The thing here is that you have to ***make sure*** SetCommandable is set TRUE later. And ClearAllActions() also to remove ForceFollow (see nwscript descriptions)

#8
andysks

andysks
  • Members
  • 1 652 messages
Did that. They do auto follow, but with a small delay, depending on the AI of them, follow distance etc.
For example, I had a scene that the PC moves somewhere, one of the party follows shortly after, and the rest stays put. So yes, they do follow but they might as well not :D.

#9
kamal_

kamal_
  • Members
  • 5 258 messages
I'm not sure if it would work or not, but you might try making the party members a member of a group, and then using the group functions.

#10
bealzebub

bealzebub
  • Members
  • 352 messages
if the script fires from a conversation, you could just use the ga_move script for each possible companion. If they are present they will move, if not, nothing happens.

#11
ColorsFade

ColorsFade
  • Members
  • 1 271 messages

bealzebub wrote...

if the script fires from a conversation, you could just use the ga_move script for each possible companion. If they are present they will move, if not, nothing happens.


As this is early in the campaign and there are only a few companions at this point, that seems reasonable. 

I just wanted to see if there was a general purpose script I was missing. I may need this later, so I'll probably try the group thing first, with a custom (reusable) script, and if that works then I have something for later. 

#12
Morbane

Morbane
  • Members
  • 1 883 messages
this mis kind of a red herring - but there is a relatively old module - but good - where the builder has the PC and 3 companions virtually shoulder to shoulder in a diamond formation walking in a cut scene toward the camera - unfortunately it was one of the builders that did not make their script .nss files available to the community.

so what im trying to say is that it definitely is possible with any number of variations on spacing/formation...

:bandit:

Modifié par Morbane, 30 octobre 2013 - 11:21 .


#13
Dann-J

Dann-J
  • Members
  • 3 161 messages
If you arrange them in a formation at the starting point, then use GroupMoveToFormationLocation() to move them to another point, and have a clear walkmesh in between, and all party members have the same movement rate, and you turn following off... [takes a breath] then they should stay in formation during the walk.