Jump to content

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


hex_ratt

Recommended Posts

So translateTo() will trigger triggerboxes. This means they are viable for use as flight collision walls!

 

Porroone, I got your code working as a fire and forget spell real easy, but i was wondering if you had any ideas on making it a concentration. It seems like the flight function interrupts the effect though, I imagine this has something to do with not being able to perform other actions while translateTo() is constantly firing. any thoughts?

 

If i ever get to making a proof of concept on the walls i'll post the script.

Edited by dontkeepscore
Link to comment
Share on other sites

  • Replies 304
  • Created
  • Last Reply

Top Posters In This Topic

Try calling the other functions before the translate function, so make the checks, is trigger box yea, then we dont translate anymore. I encountered this kind of problem with my current project while trying to translate the player to the dragon's saddlebone seems like I need to call 3 translate functions, one to move the player to the saddlenode, another to move the dragon, and another to move the player along the dragon fixed on the saddlebone. Funny thing it works, I finally got a flyable riding dragon, but animation events f*** the translate function, and im just lost, so please if anybody knows of any way to do this, I would really appreciate any help, im very close here.
Link to comment
Share on other sites

Try calling the other functions before the translate function, so make the checks, is trigger box yea, then we dont translate anymore. I encountered this kind of problem with my current project while trying to translate the player to the dragon's saddlebone seems like I need to call 3 translate functions, one to move the player to the saddlenode, another to move the dragon, and another to move the player along the dragon fixed on the saddlebone. Funny thing it works, I finally got a flyable riding dragon, but animation events f*** the translate function, and im just lost, so please if anybody knows of any way to do this, I would really appreciate any help, im very close here.

 

Could you post the script? I'll make a video :)

Link to comment
Share on other sites

Sure, its pretty much the same as yesterday with 1 addition:

Scriptname _DragonFly extends Actor  

Actor property Player auto
import utility
import form
import game
import debug
import ObjectReference

float Ride
float bearing
float elevation
float speed
float posx
float posy
float posz

auto State Idle
Event OnActivate(ObjectReference akSelf)
	Utility.SetIniFloat("fInAirFallingCharGravityMult:Havok",0)
	Player = Game.GetPlayer()
	Ride = 1
	self.SetMotionType(self.Motion_Fixed)
	if Ride == 1
		Fly()
		GoToState("Deactivate")
	endIf
endEvent
endState

function Fly()
while Ride == 1
	SendAnimationEvent(Player,"HorseEnter")
	
	
	self.SetAngle(Player.GetAngleX(),0,Player.GetAngleZ())
	if Player.IsRunning() || Player.IsSprinting()
		
		posx = Player.GetPositionX()
		posy = Player.GetPositionY()
		posz = Player.GetPositionZ()
		bearing = Player.GetAngleZ()
		elevation = Player.GetAngleX()
		if Player.IsSprinting()
			speed = 2000
		else
			speed = 1000
		endIf
		

		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*2))
		Player = Game.GetPlayer()
		
		
		Player.SplineTranslateToRefNode(self, "SaddleBone",speed, speed*20,1)
		self.TranslateTo(posx,posy,posz,elevation,0,bearing,speed,1)
		Player.TranslateTo(posx,posy,posz,elevation,0,bearing,speed,1)
	else
	
		Player.SplineTranslateToRefNode(self, "SaddleBone",speed, speed*2,1)
		self.StopTranslation()
	endIf
	
endWhile
endFunction

State Deactivate
Event OnActivate(ObjectReference akSelf)
	Debug.MessageBox("sup")
	self.StopTranslation()
	Player.StopTranslation()
	Ride = 0
endEvent
endState		

its still a bit jumpy but its better than nothing.

Edited by porroone
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...