if ( GetFlying > 0 ) ; flying if ( player->GetEffect sEffectLevitate ) ; player flying float z1 set z1 to ( player->GetPos Z ) ; player vertical position set z1 to ( z1 + 15 ) ; a little higher is usually better SetPos Z z1 endifendif
You can probably just test every few frames/seconds, for instance
float t1if ( t1 < 3 ) set t1 to ( t1 + GetSecondsPassed )else set t1 to 0 if ( GetFlying > 0 ) if ( player->GetEffect sEffectLevitate ) float z1 set z1 to ( player->GetPos Z ) set z1 to ( z1 + 15 ) SetPos Z z1 endif endifendif
You will probably have similar problem/solution diving
[EDIT] added float z1
Thank you for the above info, companions are adjusting height to match the player now.
I've also made another adaptation for it which is rather useful in Sotha Sil, the alteration skill jump spell... helps me get Vivec threw the traps with out killing him but my adaptation is a bit klunky...
if ( vivec_god_companion->GetEffect sEffectJump )
if ( player->GetEffect sEffectJump ) ; player alt jumping
float x1
float y1
float z1
set x1 to ( player->GetPos X ) ; east positive to west negative
set x1 to ( x1 + -1 )
SetPos X x1
set y1 to ( player->GetPos Y ) ;north positive south negative
set y1 to ( y1 + -1 )
SetPos Y y1
set z1 to ( player->GetPos Z ) ; player vertical position
set z1 to ( z1 + 15 ) ; a little higher is usually better
SetPos Z z1
endif
Endif
Only other strange issue I've ran into thus far is a graphics glitch of sorts... Almalexia when using the travel dialog commands sometimes leaves a ghost image above her positioncell coordinates on loading the cell she was moved into. It vanishes when you save and reload the game but it looks kinda icky to have either a "flat black" Almalexia floating motionless or even when full textures is displayed of that ghost image. I'm guessing it may be due to something with the Almalexia mesh replacer by "Plangkye and others" I'm using as the Vivec replacer 1.1 by Psymoniser doesn't do this. I'm not planing on including those above mentioned visual replacers just saying what exact one seemed to have issues.
Other then that I can't tell the companions to teleport just after killing the Almalexia warrior or the game crashes. I have to leave them behind in the dome use the ring then use the ring to get back to the dome then I can safely tell them to move. I guess I'll be seeing about having them and their respawning from their own leveled list at only one point (their own personal leveled list at one location each) be disabled untill their original counterparts death in game after the player kills them which is optional for Vivec... Getting the Almalexia companion is a given any way, as for now Almalexia must be killed for the tribunal main quest to be completed.
As for getting this to happen I may be looking at the Bloodmoon's scripts for werewolf spawns, I remember seeing talk of them being scripted to only appear during the Bloodmoon main quest and vanish after.