SetIniFloat("fInAirFallingCharGravityMult:Havok",0)
In fact, I put it in this script:
Scriptname BatformToggleScript extends ActiveMagicEffect import Gameimport Soundimport Formimport Debugimport Utilityimport GlobalVariableimport ActorSpell Property DVampireBatForm AutoSpell Property DVampireBatFormToggle AutoIdle Property SwimStart AutoIdle Property swimStop AutoIdle Property JumpFall Autobool Property bIsOn Autobool Property bVal AutoEffectShader Property DVCelerityShadowForBats AutoEffectShader Property Bats_DV AutoSound Property AMBBatsSD AutoSound Property BatsFlying AutoSound Property BatsLeaving AutoSound Property VampireLaugh AutoSound Property BatsFadeOut AutoGlobalVariable Property BatsFlyingSoundLoopGLBL Autofloat bearingfloat elevationFloat Property Speed AutoFloat Property TargetDistance Autofloat speedfloat posxfloat posyfloat poszfloat movefloat dtimeEvent OnEffectStart (Actor Target, Actor Caster) while Caster.HasSpell(DVampireBatFormToggle) Fly() endwhile EndEventfunction Fly() Actor Player = Game.GetPlayer() SetIniFloat("fInAirFallingCharGravityMult:Havok",0) if Player.IsRunning() posx = Player.GetPositionX() posy = Player.GetPositionY() posz = Player.GetPositionZ() bearing = Player.GetAngleZ() elevation = Player.GetAngleX() speed = 1000 if bearing < 90 posx += (bearing)*speed posy += (90 - bearing)*speed elseif bearing > 90 && bearing < 180 posx +=(180 - bearing)*speed posy +=(90 - bearing)*speed elseif bearing > 180 && bearing < 270 posx += (180 - bearing)*speed posy += (bearing - 270)*speed elseif bearing > 270 posx += (bearing - 360)*speed posy += (bearing - 270)*speed endif posz = Player.GetPositionZ() - (elevation*speed) Player.TranslateTo(posx,posy,posz,Player.GetAngleX(),Player.GetAngleY(),Player.GetAngleZ(),speed,1) if Player.IsSprinting() move = 0 endIf else Player.StopTranslation() endIfendFunctionEvent OnTranslationComplete() move = 0 Fly()endEventEvent OnEffectFinish(Actor Player, Actor Caster) DisablePlayerControls() Wait(0.5) Player.StopTranslation() EnablePlayerControls() SetIniFloat("fInAirFallingCharGravityMult:Havok",1.35) EndEventAs you can see I tried adding it in but a strange thing occurs. The 0 gravity only seems to occur at certain altitude or rather elevation. The rest of the time if I stop Running with my character he begins to fall toward the ground.
Any ideas?
