Jump to content

Proof that a player can fly in Skyrim well may be more like swimming


hex_ratt

Recommended Posts

  • Replies 304
  • Created
  • Last Reply

Top Posters In This Topic

I kind of did something similar using a ring instead, when equipping it makes you fly and plays the fall iddle, I dont have any videos but here is the code if someone is interested.

Scriptname __PlyFly extends ObjectReference
import Actor

Idle property JumpFall auto
Armor property DuneFlyingRing auto
Actor property player auto

float bearing
float elevation
float speed
float posx
float posy
float posz
float move
float dtime


Event OnEquipped(actor player)

RegisterForUpdate(0.01)
player.PlayIdle(JumpFall)
player.SetMotionType(Motion_Keyframed)
endEvent



Event OnUpdate()

if player.IsRunning()
	
	UnregisterForUpdate()
	posx = player.GetPositionX()
	posy = player.GetPositionY()
	posz = player.GetPositionZ()
	Fly()
else
	
endIf

endEvent

function Fly()

bearing = player.GetAngleZ()
if player.GetAngleX() > 10
	elevation = -50
elseif player.GetAngleX() < -10
	elevation = 50

elseif player.GetAngleX() > -10 && player.GetAngleX() < 10
	elevation = 0
endif

speed = 10000

if bearing < 90 
	posx += (bearing)*100
	posy += (90 - bearing)*100
elseif bearing > 90 && bearing < 180
	posx +=(180 - bearing)*100
	posy +=(90 - bearing)*100

elseif bearing > 180 && bearing < 270
	posx += (180 - bearing)*100
	posy += (bearing - 270)*100
	
elseif bearing > 270
	posx += (bearing - 360)*100
	posy += (bearing - 270)*100
	
endif
posz = player.GetPositionZ() + (elevation * 100)
player.PlayIdle(JumpFall)
TranslateTo(posx,posy,posz,player.GetAngleX(),player.GetAngleY(),player.GetAngleZ(),speed,1)
RegisterForSingleUpdate(0.01)
endFunction


Event OnUnequipped(Actor player)
StopTranslation()
UnregisterForUpdate()

endEvent

 

Its a bit glitchy, I dont advise using it lol, i made it mostly to check how script flight simulation worked.

Edited by porroone
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...