Messing with companions

Post » Fri May 27, 2011 10:58 pm

So i've been tweaking and messing around with various companion scripts. And for some reason I can't get any companions to jump!

I want a companion to jump whenever I jump. But for some reason its not detecting the PC jumping.
Its currently attachted to the slaveScript. (maybe that is my problem?)
if ( GetCurrentAIPackage == 3 )	if ( GetPCSleep == 1 )		StartScript fs_compLevel	endif	if ( GetPCSneaking == 1 )		ForceSneak	elseif ( GetPCSneaking == 0 )		ClearForceSneak	endif	if ( GetPCJumping == 1 )		ForceJump		Messagebox "slave Jump"	elseif ( GetPCJumping == 0 )		ClearForceJump	endif
(Edit: switched to code tag to preserve formatting)

For some reason, using the following script, GetPCJumping is never 1.

Anyone help?
User avatar
Greg Cavaliere
 
Posts: 3514
Joined: Thu Nov 01, 2007 6:31 am

Post » Sat May 28, 2011 9:09 am

Could you show the entire script? Does sneaking work?

Does "slave Jump" ever appear?
User avatar
Allison Sizemore
 
Posts: 3492
Joined: Wed Jul 19, 2006 6:09 am

Post » Sat May 28, 2011 9:47 am

Sneaking appears to work just fine. The messageboxbox never shows up.

There is a section in the original script for checks that are done every 20 frames. I tried that last night actually as well and it didn't seem to work either.

Edit:
So it works on a normal companion script. Just not the slaveScript for some reason. Oh well, I can live without my slaves jumping. Time to tweak the timings now!

Edit2:
Okay. So now I can't seem to get my companion to jump a few frames after me. :confused:
This is the plain jump at the same time script.
; FORCED JUMPINGif ( GetCurrentAiPackage == 3 )	if ( Player->GetPCJumping == 1 )		ForceJump		set stopJump to 1	elseif ( Player->GetPCJumping == 0 )		if ( stopJump == 1 ) ;companion jumped			ClearForceJump ;stop jumping			set stopJump to  0		endif	endif	;--endif


And this is how I was trying to get a timed jump.
; FORCED JUMPINGif ( GetCurrentAiPackage == 3 )	if ( Player->GetPCJumping == 1 )		set stopJump to 1	elseif ( Player->GetPCJumping == 0 )		if ( stopJump == 2 ) ;companion jumped			ClearForceJump ;stop jumping			set stopJump to  0		endif	endif	;--		if ( stopJump == 1 )		if ( timerJump > 0.5 )			ForceJump			set stopJump to 2		else			set timerJump to ( timerJump + GetSecondsPassed )		endif	endifendif



Final Edit:

Nevermind. I got it to work out fine for my companions after some tweaking.
User avatar
Scarlet Devil
 
Posts: 3410
Joined: Wed Aug 16, 2006 6:31 pm


Return to III - Morrowind