Follow Script, v1.0 (01.22.2007)

Status
Not open for further replies.

Twiddle

Active Member
Salute!

This script is a simple followscript for 'Vanguard: Saga of Heroes'. It makes you able to follow a character without using the build in /follow function in Vanguard. You can adjust the leash and keep following the person you want without having him targeted.

Enjoy the script!

~


Syntax

Code:
  run vgfollow <name> <leash>
Parameters explained

Code:
  <name>:  The name of the person you want to follow. 
           If left blank, the script will use your current defensive target. 
           If no defensive target is found, the script will end.

  <leash>: Adjusting the leash will make you able to follow a person 
           with a longer distance between you. If you want to use 
           <leash> it requires you to supply the name of the person you 
           want to follow. If left blank, a default leash of 3 will be used.
Code

Code:
  Please download the attached file.
Release notes

Code:
  v1.0
   - Initial Release
 

Attachments

Tailormade

Active Member
what would have to be added to this script to make sure the character is always facing the target?


I'm looking at the code for the script, and the face commands look as though the script should already be making me face the target. I'm not conversant with lavishscript at all, but it seems the part of the code below between the rows of asterisks is what controls facing the npc, but somehow its not working. My thought is that if the "Pawn[name,${master}]:Face" command was repeated after the "VG:ExecBinding[AutoRun,release]" near the end of the script, it would solve this problem. I'm going to try it and see what happens, but I am quite oepn to better idea from people who actually know something about isx scripting.

pasted code, with marked spot where I think the current command is causing the character to face the target.

Code:
function main(string master, int leash=3)
{

   echo *******************************
   echo * Initializing 'vgfollow.iss' *
   echo *******************************
   ;    * ~ By Twiddle ****************
   ;    ***************************************
   ;    * Syntax: run vgfollow <name> <leash> *
   ;    *                                     *
   ;    *    Both parameters are optional     *
   ;    ***************************************

   if ${master.Equal[""]} && ${Me.DTarget(exists)}
	master:Set[${Me.DTarget.Name}]

   if ${master.Equal[""]}
   {
	echo -> Missing Parameter or Target
	endscript vgfollow
   }

   echo -> Leash set to: '${leash}'
   echo -> Using master: '${master}'

   if !${Pawn[name,${master}](exists)}
	   echo -> Waiting for '${master}' to enter the world
   end if

   do 
   {

	do 
	{
		wait 3
	}
	while !${Pawn[name,${master}](exists)}

	if ${Pawn[${master}].Distance} > ${leash}
	{

		Pawn[name,${master}]:Face

		VG:ExecBinding[AutoRun]

		echo -> Starting follow (Distance: ${Pawn[${master}].Distance})

********************
		do
		{
			Pawn[name,${master}]:Face
			waitframe
		}
********************

		while ${Pawn[${master}].Distance} > ${Math.Calc[${leash}-2]} && ${Pawn[name,${master}](exists)}

		if ${Pawn[name,${master}](exists)}
			echo -> Stopping follow (Distance: ${Pawn[${master}].Distance})
		else
			echo -> Stopping follow ('${master}' no longer exists)

		VG:ExecBinding[AutoRun,release]

	}

   }
   while 1

}
 
Last edited by a moderator:
Status
Not open for further replies.
Top Bottom